]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
Update img plugin to version 3.20160506
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index 62383b6fd22cf3ca6bed2dc3571f5cafb3c10715..b6923b54f89e55e0878977fdc906d849baa81e9f 100644 (file)
@@ -131,7 +131,7 @@ sub needsignin ($$) {
 
        if (! defined $session->param("name") ||
            ! userinfo_get($session->param("name"), "regdate")) {
-               $session->param(postsignin => $ENV{QUERY_STRING});
+               $session->param(postsignin => $q->query_string);
                cgi_signin($q, $session);
                cgi_savesession($session);
                exit;
@@ -460,6 +460,9 @@ sub cgi (;$$) {
 sub cgierror ($) {
        my $message=shift;
 
+       eval q{use HTML::Entities};
+       $message = encode_entities($message);
+
        print "Content-type: text/html\n\n";
        print cgitemplate(undef, gettext("Error"),
                "<p class=\"error\">".gettext("Error").": $message</p>");