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; } }