summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-09-17 08:57:39 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-09-17 08:57:39 +0200
commit34e48ad804ef613d83f184cf33a938cbfd7400b9 (patch)
tree5e379ecdfd6dfc78ca1a894846ed55e4eb7c09cc /includes
parent9340fddbac59a2aab12dd0fa0e122b4d7c3bf0c8 (diff)
downloadgigologadmin-34e48ad804ef613d83f184cf33a938cbfd7400b9.tar.gz
gigologadmin-34e48ad804ef613d83f184cf33a938cbfd7400b9.tar.bz2
gigologadmin-34e48ad804ef613d83f184cf33a938cbfd7400b9.zip
Return better error for failed CSRF check on import.
Diffstat (limited to 'includes')
-rw-r--r--includes/admin/views/giglog_import_gigs.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php
index 193cd9e..1a72fe1 100644
--- a/includes/admin/views/giglog_import_gigs.php
+++ b/includes/admin/views/giglog_import_gigs.php
@@ -31,8 +31,8 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
GiglogAdmin_ImportGigsPage::process_upload($_FILES['giglog_import_file']);
}
else {
- header('HTTP/1.1 400 Bad Request');
- wp_die('Bad request', 400);
+ header("{$_SERVER['SERVER_PROTOCOL']} 403 Forbidden");
+ wp_die('CSRF validation failed.', 403);
}
}
}