Created
November 26, 2013 15:15
-
-
Save bjrnqprs/7660111 to your computer and use it in GitHub Desktop.
Typo3 RSA Auth extension (ext:rsaauth). Fix for allowing password managers to store the password.
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
/** | |
* For Typo3 EXT:rsaauth: Clones the password field before replacing its value. | |
* This allows password managers to save the entered password, instead of the hashed version. | |
* | |
* Load this code/file on the bottom of your page. Requires jQuery. | |
* | |
* WARNING: HTTPS is adviced when using this as the password is send clear-text as well. | |
*/ | |
if(typeof tx_rsaauth_feencrypt == 'function') { | |
var orig_tx_rsaauth_feencrypt = window.tx_rsaauth_feencrypt; | |
window.tx_rsaauth_feencrypt = function(form) { | |
$('#inputPass') | |
.attr({name: 'pass_ct', id: 'inputPassCt'}) | |
.clone() | |
.attr({type: 'hidden', name: 'pass', id: 'inputPass'}) | |
.insertAfter('#inputPassCt'); | |
orig_tx_rsaauth_feencrypt(form); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment