mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
elofgren: If the access key for Email_BounceHandler is not given, display a 'No "Key" specified' error instead of 'Invalid "Key" specified' to make things clearer.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41979 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1c044df977
commit
f3dde5bf6b
@ -796,9 +796,15 @@ class Email_BounceHandler extends Controller {
|
||||
$task->index();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Check if access key exists
|
||||
if( !isset($_REQUEST['Key']) ) {
|
||||
echo 'Error: Access validation failed. No "Key" specified.';
|
||||
return;
|
||||
}
|
||||
|
||||
// Check against access key defined in sapphire/_config.php
|
||||
if( !isset($_REQUEST['Key']) || $_REQUEST['Key'] != EMAIL_BOUNCEHANDLER_KEY) {
|
||||
if( $_REQUEST['Key'] != EMAIL_BOUNCEHANDLER_KEY) {
|
||||
echo 'Error: Access validation failed. Invalid "Key" specified.';
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user