diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-09-17 08:57:39 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-09-17 08:57:39 +0200 |
commit | 34e48ad804ef613d83f184cf33a938cbfd7400b9 (patch) | |
tree | 5e379ecdfd6dfc78ca1a894846ed55e4eb7c09cc /includes | |
parent | 9340fddbac59a2aab12dd0fa0e122b4d7c3bf0c8 (diff) | |
download | gigologadmin-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.php | 4 |
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); } } } |