Commit e782d548ac0406c33134c7b8f06fd1a24e8a3ccf

Authored by David RENÉ
1 parent 42dd94b5

[-] fix the web action name. Add "aws_a" as valid name

Showing 1 changed file with 6 additions and 5 deletions   Show diff stats
web/making_a_web_site.anubis
@@ -2798,7 +2798,7 @@ define (List(Web_arg) lwa, HTTP_Info info) -> Separated_Web_Args($State) @@ -2798,7 +2798,7 @@ define (List(Web_arg) lwa, HTTP_Info info) -> Separated_Web_Args($State)
2798 with name = if substr(n,0,4) = "amp;" then substr(n, 4, length(n) - 4) else n, 2798 with name = if substr(n,0,4) = "amp;" then substr(n, 4, length(n) - 4) else n,
2799 if name = "a" then 2799 if name = "a" then
2800 swa(ps1,success(value),op1) 2800 swa(ps1,success(value),op1)
2801 - else if name = "aws_action" then 2801 + else if name = "aws_action" | name = "aws_a" then
2802 swa(ps1,success(value),op1) 2802 swa(ps1,success(value),op1)
2803 //else if name = "t" then 2803 //else if name = "t" then
2804 // swa(ps1,an1,[web_arg("target",value) . op1]) 2804 // swa(ps1,an1,[web_arg("target",value) . op1])
@@ -2873,12 +2873,13 @@ define ($State previous, @@ -2873,12 +2873,13 @@ define ($State previous,
2873 else f(previous,action_name,http_info,lwa,is_https,others), 2873 else f(previous,action_name,http_info,lwa,is_https,others),
2874 2874
2875 http_https_action(an,allow,do_it) then 2875 http_https_action(an,allow,do_it) then
2876 - if an = action_name  
2877 - then  
2878 - //println("Action ["+action_name+"] found"); 2876 + if an = action_name then
  2877 + println("Action ["+action_name+"] found");
2879 if allow(previous) 2878 if allow(previous)
2880 then do_it(http_info,lwa,previous) 2879 then do_it(http_info,lwa,previous)
2881 - else previous 2880 + else
  2881 + println("user not allowed to execute that Action ["+action_name+"]");
  2882 + previous
2882 else f(previous,action_name,http_info,lwa,is_https,others), 2883 else f(previous,action_name,http_info,lwa,is_https,others),
2883 2884
2884 } 2885 }