Skip to content

Update login.ztml - #106

Merged
allebb merged 1 commit into
zpanel:masterfrom
japp-0xlabs:patch-3
Feb 10, 2014
Merged

Update login.ztml#106
allebb merged 1 commit into
zpanel:masterfrom
japp-0xlabs:patch-3

Conversation

@japp-0xlabs

Copy link
Copy Markdown
Contributor

XSS fixes.

If form action is empty, the target is self script. PHP_SELF not needed.

XSS fixes.

If form action is empty, the target is self script. PHP_SELF not needed.
@allebb

allebb commented Feb 10, 2014

Copy link
Copy Markdown
Contributor

This was previously added to ensure legacy browser support but I guess as the latest theme is using a whole load of jQuery and HTML5 I guess we could remove the attribute value for no other reason but to remove a few characters from the login template.

allebb added a commit that referenced this pull request Feb 10, 2014
Removal of FORM POST URL (use of PHP_SELF constant) as not required (code clean-up).
@allebb
allebb merged commit e24b0f7 into zpanel:master Feb 10, 2014
@japp-0xlabs

Copy link
Copy Markdown
Contributor Author

I think other little reason could be XSS patch as I said, if you don't sanitize PHP_SELF and you try something like /index.php/%22%3E%3Cscript%3Ealert%28document.cookie%29%3C%2fscript%3E you will get nice javascript alert.

@5050

5050 commented Feb 10, 2014

Copy link
Copy Markdown
Contributor

(only for note) Since HTML5, action="" is reported as an error by html validator (http://validator.w3.org/). when empty, the directive "action" should be completely removed.

@allebb

allebb commented Feb 10, 2014

Copy link
Copy Markdown
Contributor

Cheers 5050, I'll remove the attribute altogether 👍

@allebb

allebb commented Feb 10, 2014

Copy link
Copy Markdown
Contributor

Fixed: a8a540d - Good call there 5050!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants