Webbserver - Love Blomberg

Show sourcecode

The following files exists in this folder. Click to view.

public_html/crumbs/

.gitignore
admin/
config.php
createtable.php
crumbs_design_system.html
dbconnection.php
icons/
includes/
index.php
js/
login.php
logout.php
order/
register.php
style/

logout.php

12 lines UTF-8 Windows (CRLF)
<?php
// SÄKERHET: Kräv POST-metod för utloggning (GET-baserad utloggning är sårbar för CSRF-attacker)
session_start();
if (
$_SERVER['REQUEST_METHOD'] !== 'POST') {
  
http_response_code(405);
  die(
"Otillåten metod.");
}
// Ta bort session vid utloggning
session_unset();
session_destroy();
header("Location: login.php");
exit();