diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2015-05-19 14:09:38 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-19 15:34:46 -0400 |
commit | a5309078ec06ecc28ed00e31cb5c4bb3ac76cf94 (patch) | |
tree | e5d01844111ef5eef8a6a9c5086cf8d90b667d11 | |
parent | da0baca91b32e5baa34a311fe8a6fcf76c41eae6 (diff) | |
download | ikiwiki-a5309078ec06ecc28ed00e31cb5c4bb3ac76cf94.tar ikiwiki-a5309078ec06ecc28ed00e31cb5c4bb3ac76cf94.tar.gz |
make cgiurl output deterministic
IkiWiki::cgiurl() currently produces non-deterministic output, because
the params hash can be sorted different ways.
Sorting keys to params before crafting the string should make the
output deterministic.
-rw-r--r-- | IkiWiki.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index bb36b0885..a70773506 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1217,7 +1217,7 @@ sub cgiurl (@) { } return $cgiurl."?". - join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params); + join("&", map $_."=".uri_escape_utf8($params{$_}), sort(keys %params)); } sub cgiurl_abs (@) { |