Created
May 10, 2012 14:41
-
-
Save xpathr/2653539 to your computer and use it in GitHub Desktop.
Login form injection by phoque
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet version="1.0" | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <!-- | |
| It is very important that you are using <xsl:include /> instead of | |
| <xsl:import /> to include this template, otherwise this util will not work! | |
| Background: templates in an imported stylesheet will be overwritten by | |
| templates in the current stylesheet while the ones being included will not. | |
| This util assumes that your master matches "/" and your page matches "data". | |
| --> | |
| <xsl:template match="data[events/user/@logged-in = 'false']"> | |
| <form action="{$root}/symphony/" method="post"> | |
| <label>Username | |
| <input name="username" type="text" /> | |
| </label> | |
| <label>Password | |
| <input name="password" type="password" /> | |
| </label> | |
| <input name="action[login]" type="submit" value="Login" /> | |
| <input name="redirect" type="hidden" value="{$current-path}" /> | |
| </form> | |
| </xsl:template> | |
| </xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment