Commit 73958ee2 authored by Koosha Khajeh Moogahi's avatar Koosha Khajeh Moogahi Committed by Frédéric Buclin

Bug 793826: Prevent private web service methods from being called

r=dkl a=LpSolit
parent d642d81c
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment