Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitizing user input #5

Open
wants to merge 1 commit into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Sanitizing user input

  • Loading branch information...
birep committed May 29, 2019
commit 13273e019d737f8eb4d7b1fe1eb665185dddfb5a
@@ -82,12 +82,13 @@ function execTime($function, $title="", $iterations = 100000) {
<form method="post">
<p>Path:<br />
<input type="text" size="120" name="path"
value="<?php echo stripslashes($_POST['path']); ?>" /></p>
value="<?php echo htmlspecialchars(stripslashes($_POST['path']), ENT_QUOTES); ?>" /></p>
<p><input type="submit" /></p>
</form>
<dl>
<?php
foreach ($paths as $path) {
$path = htmlspecialchars($path, ENT_QUOTES);
echo "<dt><pre>Path '$path' becomes:</pre></dt>\n";
echo "<dd><pre>";
echo "'" . RelativePath::getRelativePath($path) . "'\n";
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.