Diff -- /var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/logout.cgi
Diff
/var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/logout.cgi
added on local at 2026-07-01 13:47:23
Added
+24
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to 3897173ca5ca
to 3897173ca5ca
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | #!/usr/bin/perl | |
| 2 | #====================================================================== | |
| 3 | # WebSTLs — logout | |
| 4 | # Revokes the current session and clears the cookie. 302 to /index.cgi. | |
| 5 | #====================================================================== | |
| 6 | use strict; | |
| 7 | use warnings; | |
| 8 | ||
| 9 | use lib '/var/www/vhosts/3dshawn.com/affiliate.3dshawn.com'; | |
| 10 | use CGI; | |
| 11 | use MODS::Login; | |
| 12 | ||
| 13 | my $auth = MODS::Login->new; | |
| 14 | ||
| 15 | $|=1; | |
| 16 | ||
| 17 | # Verify session (so we can revoke it server-side too). | |
| 18 | my $userinfo = $auth->login_verify(); | |
| 19 | $auth->logout_exec($userinfo) if $userinfo; | |
| 20 | ||
| 21 | # Clear cookie + bounce home. | |
| 22 | print $auth->clear_cookie_header(); | |
| 23 | print "Status: 302 Found\nLocation: /index.cgi\n\n"; | |
| 24 | exit; |