Bug 35960: Use .val() instead of string concat to prevent potential XSS
Test plan: 1. Log out 2. Go to /cgi-bin/koha/mainpage.pl#somestring"with<html>char 3. Open the brower's inspector and find "auth_forwarded_hash" input 4. Make sure the value attribute is there and corresponds to the URL's fragment. It should be URI-encoded. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
parent
931a02f54a
commit
dca99588e7
|
|
@ -185,7 +185,9 @@
|
|||
<script>
|
||||
$(document).ready( function() {
|
||||
if ( document.location.hash ) {
|
||||
$( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' );
|
||||
const input = $('<input name="auth_forwarded_hash" type="hidden">')
|
||||
input.val(document.location.hash);
|
||||
$( '#loginform' ).append( input );
|
||||
}
|
||||
// Clear last borrowers, rememberd sql reports, carts, etc.
|
||||
logOut();
|
||||
|
|
|
|||
Loading…
Reference in New Issue