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:
Ingo Schommer 2007-09-16 00:38:41 +00:00
parent 1c044df977
commit f3dde5bf6b

View File

@ -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;
}