mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 09:04:02 +02:00
Use JSON.parse if available
This commit is contained in:
@@ -91,7 +91,7 @@ function page_headers() {
|
|||||||
header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
|
header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
|
||||||
header("X-Content-Type-Options: nosniff");
|
header("X-Content-Type-Options: nosniff");
|
||||||
header("Referrer-Policy: origin-when-cross-origin");
|
header("Referrer-Policy: origin-when-cross-origin");
|
||||||
header("Content-Security-Policy: default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self'; frame-src https://www.adminer.org; form-action 'self'");
|
header("Content-Security-Policy: default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self'; frame-src https://www.adminer.org; form-action 'self'");
|
||||||
$adminer->headers();
|
$adminer->headers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -565,7 +565,7 @@ function ajax(url, callback, data, message) {
|
|||||||
*/
|
*/
|
||||||
function ajaxSetHtml(url) {
|
function ajaxSetHtml(url) {
|
||||||
return ajax(url, function (request) {
|
return ajax(url, function (request) {
|
||||||
var data = eval('(' + request.responseText + ')');
|
var data = window.JSON ? JSON.parse(request.responseText) : eval('(' + request.responseText + ')');
|
||||||
for (var key in data) {
|
for (var key in data) {
|
||||||
setHtml(key, data[key]);
|
setHtml(key, data[key]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user