You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-31 10:54:46 +03:00
Fix hash validation
- use copy of hash to avoid race condition - stricter regex to match whole string Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
@@ -624,9 +624,9 @@ AJAX.registerOnload('config.js', function () {
|
||||
var tab_check_fnc = function () {
|
||||
if (location.hash != prev_hash) {
|
||||
prev_hash = location.hash;
|
||||
if (location.hash.match(/^#tab_[a-zA-Z0-9_]+/)) {
|
||||
if (prev_hash.match(/^#tab_[a-zA-Z0-9_]+$/)) {
|
||||
// session ID is sometimes appended here
|
||||
var hash = location.hash.substr(5).split('&')[0];
|
||||
var hash = prev_hash.substr(5).split('&')[0];
|
||||
if ($('#' + hash).length) {
|
||||
setTab(hash);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user