Skip to content

Commit

Permalink
fix 1682; missing b=bname in CGI mode in buttons_place
Browse files Browse the repository at this point in the history
  • Loading branch information
hgouraud committed Dec 27, 2023
1 parent 4319e41 commit 7ab19e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hd/etc/buttons_places.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
%if;(e.lang!=default_lang)
<input type="hidden" name="lang" value="%e.lang;">
%end;
%if;cgi;
<input type="hidden" name="b" value="%bname_token;">
%end;
<div class="form-inline">
<label class="sr-only" for="k">[*place/places]0 (k)</label>
<input type="search" class="form-control col-4 ml-2" name="k"
Expand Down
4 changes: 4 additions & 0 deletions lib/templ.ml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ let url_aux ?(pwd = true) conf =

let order =
[
"b";
"lang";
"templ";
"iz";
Expand Down Expand Up @@ -483,6 +484,9 @@ and eval_simple_variable conf = function
| "plugins" ->
let l = List.map Filename.basename conf.plugins in
String.concat "," l
| "bname" -> conf.bname
| "token" -> conf.cgi_passwd
| "bname_token" -> String.concat "_" [ conf.bname; conf.cgi_passwd ]
| "prefix" -> (Util.commd conf :> string)
| "prefix_base" -> (Util.commd ~pwd:false conf :> string)
| "prefix_base_password" -> (Util.commd conf :> string)
Expand Down

0 comments on commit 7ab19e8

Please sign in to comment.