Diff -- /var/www/vhosts/3dshawn.com/admin.3dshawn.com/logout.cgi
Diff
/var/www/vhosts/3dshawn.com/admin.3dshawn.com/logout.cgi
added on local at 2026-06-21 23:13:52
Added
+0
lines
Removed
-0
lines
Context
20
unchanged
Blobs
from 35baae3b6dd4
to 35baae3b6dd4
to 35baae3b6dd4
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | 1 | #!/usr/bin/perl |
| 2 | 2 | use strict; |
| 3 | 3 | use warnings; |
| 4 | 4 | use lib '/var/www/vhosts/3dshawn.com/admin.3dshawn.com'; |
| 5 | 5 | use MODS::Login; |
| 6 | 6 | |
| 7 | 7 | my $auth = MODS::Login->new; |
| 8 | 8 | # Pull the session cookie value, kill the row in DB, clear the cookie. |
| 9 | 9 | my $raw = $ENV{HTTP_COOKIE} || ''; |
| 10 | 10 | my $sid; |
| 11 | 11 | foreach my $pair (split /;\s*/, $raw) { |
| 12 | 12 | my ($k, $v) = split /=/, $pair, 2; |
| 13 | 13 | next unless defined $k && defined $v; |
| 14 | 14 | $k =~ s/^\s+|\s+$//g; |
| 15 | 15 | $sid = $v if $k eq 'meta_session'; |
| 16 | 16 | } |
| 17 | 17 | $auth->sign_out($sid) if $sid; |
| 18 | 18 | |
| 19 | 19 | print $auth->clear_cookie_header . "\n"; |
| 20 | 20 | print "Status: 302 Found\nLocation: /login.cgi\n\n"; |