Diff -- /var/www/vhosts/3dshawn.com/admin.3dshawn.com/logout.cgi

O Operator
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
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
11#!/usr/bin/perl
22use strict;
33use warnings;
44use lib '/var/www/vhosts/3dshawn.com/admin.3dshawn.com';
55use MODS::Login;
66
77my $auth = MODS::Login->new;
88# Pull the session cookie value, kill the row in DB, clear the cookie.
99my $raw = $ENV{HTTP_COOKIE} || '';
1010my $sid;
1111foreach my $pair (split /;\s*/, $raw) {
1212 my ($k, $v) = split /=/, $pair, 2;
1313 next unless defined $k && defined $v;
1414 $k =~ s/^\s+|\s+$//g;
1515 $sid = $v if $k eq 'meta_session';
1616}
1717$auth->sign_out($sid) if $sid;
1818
1919print $auth->clear_cookie_header . "\n";
2020print "Status: 302 Found\nLocation: /login.cgi\n\n";