]> git.proxmox.com Git - proxmox-backup.git/commitdiff
improve 'debug' parameter
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 25 Jun 2020 08:45:49 +0000 (10:45 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 26 Jun 2020 07:12:14 +0000 (09:12 +0200)
instead of checking on '1' or 'true', check that it is there and not
'0' and 'false'. this allows using simply

https://foo:8007/?debug

instead of

https://foo:8007/?debug=1

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/server/rest.rs

index 95f731913a10bb86477b87261e5e3d1f94bcf009..14e78d600239c1479828d65f68208956359efd0f 100644 (file)
@@ -323,7 +323,7 @@ fn get_index(username: Option<String>, token: Option<String>, template: &Handleb
 
     if let Some(query_str) = parts.uri.query() {
         for (k, v) in form_urlencoded::parse(query_str.as_bytes()).into_owned() {
-            if k == "debug" && v == "1" || v == "true" {
+            if k == "debug" && v != "0" && v != "false" {
                 debug = true;
             }
         }