diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-05-19 17:33:46 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:56 +0200 |
commit | 216af94b979206ee77d3f3b783648a959b120547 (patch) | |
tree | 8d08425a6b009558c4c1803f8dfba0de0d667fba /Bugzilla/CGI | |
parent | 20c6de522aa4d27ba3c3f76d68c0b89424789270 (diff) | |
download | bugzilla-216af94b979206ee77d3f3b783648a959b120547.tar.gz bugzilla-216af94b979206ee77d3f3b783648a959b120547.tar.xz |
more things
Diffstat (limited to 'Bugzilla/CGI')
-rw-r--r-- | Bugzilla/CGI/Role.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/CGI/Role.pm b/Bugzilla/CGI/Role.pm index 1d674180e..33807eb7e 100644 --- a/Bugzilla/CGI/Role.pm +++ b/Bugzilla/CGI/Role.pm @@ -68,4 +68,17 @@ sub csp_nonce { return $csp->has_nonce ? $csp->nonce : ''; } +# Cookies are removed by setting an expiry date in the past. +# This method is a send_cookie wrapper doing exactly this. +sub remove_cookie { + my ($self, $name) = @_; + + # Expire the cookie, giving a non-empty dummy value (bug 268146). + $self->send_cookie( + '-name' => $name, + '-expires' => 'Tue, 15-Sep-1998 21:49:00 GMT', + '-value' => 'X' + ); +} + 1; |