Skip to content

Demo: Fix captcha and marketo demo #1103

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

Closed

Conversation

tractorcow
Copy link
Collaborator

Captcha demo did not link to the correct folder for jquery-validate.js, and also had an unnecessary .htaccess allowing execution of jpg files as php (which is needless since there are no jpg in that folder). This is a very minor security risk, but probably not one that needs to be kept around.

Fixed content type of image being incorrectly reported as text/html, which caused browser warnings.

Marketo demo also had a broken link to jquery-validate.js

@@ -31,5 +31,3 @@

// Output the image as a png
imagepng($image);

?>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the closing PHP tag

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a good practice to strip the php ending tags. Those are optional and sometimes cause problems when they are followed by whitespace chars

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Closing PHP tags increases the chance for hidden whitespace and other plain text characters making it's way into the output, which is hazardous if emitting image data to the stream.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, beat me to the punch, @staabm !

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I know nothing about PHP so I'll trust you guys 😉

@jzaefferer
Copy link
Collaborator

Thanks! Resolved the conflict with the changes from #1104 and fixed the captcha-reloading.

@tractorcow tractorcow deleted the pulls/fix-demos branch May 7, 2014 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants