Bug 793826: Prevent private web service methods from being called

r=dkl a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@264326 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2012-10-12 18:00:46 +00:00
parent 59786ce60f
commit 24145fb0de
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
8421
8422

View File

@ -17,7 +17,9 @@ use Scalar::Util qw(blessed);
sub handle_login {
my ($self, $class, $method, $full_method) = @_;
ThrowCodeError('unknown_method', {method => $full_method}) if !$class;
# Throw error if the supplied class does not exist or the method is private
ThrowCodeError('unknown_method', {method => $full_method}) if (!$class or $method =~ /^_/);
eval "require $class";
ThrowCodeError('unknown_method', {method => $full_method}) if $@;
return if ($class->login_exempt($method)