Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
Securimage
Commits
f81dcedd
Commit
f81dcedd
authored
3 years ago
by
redacted
Browse files
Options
Download
Patches
Plain Diff
fixed xss
parent
5fc5953c
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/static_captcha.php
+4
-2
examples/static_captcha.php
with
4 additions
and
2 deletions
+4
-2
examples/static_captcha.php
+
4
−
2
View file @
f81dcedd
...
@@ -58,6 +58,8 @@ if (isset($_GET['validate'])) {
...
@@ -58,6 +58,8 @@ if (isset($_GET['validate'])) {
// generate a new captcha ID and challenge
// generate a new captcha ID and challenge
$captchaId
=
Securimage
::
getCaptchaId
();
$captchaId
=
Securimage
::
getCaptchaId
();
$currentScript
=
htmlspecialchars
(
$_SERVER
[
'PHP_SELF'
],
ENT_QUOTES
);
// output the captcha ID, and a form to validate it
// output the captcha ID, and a form to validate it
// the form submits to itself and is validated above
// the form submits to itself and is validated above
echo
<<<EOD
echo
<<<EOD
...
@@ -82,9 +84,9 @@ echo <<<EOD
...
@@ -82,9 +84,9 @@ echo <<<EOD
<p> </p>
<p> </p>
<div>
<div>
Captcha ID: $captchaId<br /><br />
Captcha ID: $captchaId<br /><br />
<img src="
{$_SERVER['PHP_SELF']}
?display&id=$captchaId" alt="Captcha Image" /><br />
<img src="
$currentScript
?display&id=$captchaId" alt="Captcha Image" /><br />
<form method="get" action="
{$_SERVER['PHP_SELF']}
">
<form method="get" action="
$currentScript
">
<input type="hidden" name="validate" value="1" />
<input type="hidden" name="validate" value="1" />
<input type="hidden" name="id" value="$captchaId" />
<input type="hidden" name="id" value="$captchaId" />
Enter Code:
Enter Code:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets