From 4918ba407f905a95314d1a89d33387fa08389e44 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 8 Sep 2025 21:26:35 +0200 Subject: [PATCH] Increase max. ?sql= length (fix #1154) --- adminer/static/editing.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/adminer/static/editing.js b/adminer/static/editing.js index bf89a9e3..ad66580a 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -662,13 +662,14 @@ function indexesAddColumn(prefix) { * @param string */ function sqlSubmit(form, root) { - if (encodeURIComponent(form['query'].value).length < 500) { - form.action = root - + '&sql=' + encodeURIComponent(form['query'].value) - + (form['limit'].value ? '&limit=' + +form['limit'].value : '') - + (form['error_stops'].checked ? '&error_stops=1' : '') - + (form['only_errors'].checked ? '&only_errors=1' : '') - ; + const action = root + + '&sql=' + encodeURIComponent(form['query'].value) + + (form['limit'].value ? '&limit=' + +form['limit'].value : '') + + (form['error_stops'].checked ? '&error_stops=1' : '') + + (form['only_errors'].checked ? '&only_errors=1' : '') + ; + if ((document.location.origin + document.location.pathname + action).length < 2000) { // reasonable minimum is 2048 + form.action = action; } }