]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - settings/install.php
Setup: Use HTTP POST instead of GET when testing MySQL and RPC credentials.
[irc/unrealircd/unrealircd-webpanel.git] / settings / install.php
index 61505b89ee6de0ea5e4cd3f16f42f4301431b065..dc4d59d1744de7dfcf7443045da8fcd155a8cb8f 100644 (file)
@@ -343,7 +343,15 @@ $writable = (is_writable("../config/")) ? true: false;
        sql_test_conn.addEventListener('click', e => {
                sql_test_conn.classList.add('disabled');
                sql_test_conn.innerHTML = "Checking...";
-               fetch(BASE_URL + 'api/installation.php?method=sql&host='+encodeURIComponent(sql_host.value)+'&database='+encodeURIComponent(sql_db.value)+'&user='+encodeURIComponent(sql_user.value)+'&password='+encodeURIComponent(sql_pass.value))
+               fetch(BASE_URL + 'api/installation.php', {
+                     method:'POST',
+                     headers: {'Content-Type':'application/x-www-form-urlencoded'},
+                     body: 'method=sql&'+
+                           'host='+encodeURIComponent(sql_host.value)+
+                           '&database='+encodeURIComponent(sql_db.value)+
+                           '&user='+encodeURIComponent(sql_user.value)+
+                           '&password='+encodeURIComponent(sql_pass.value)
+                     })
                .then(response => response.json())
                .then(data => {
                        if (data.success)