summaryrefslogtreecommitdiffstats
path: root/qooxdoo/source/perl/Qooxdoo/JSONRPC.pm
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2009-01-05 08:52:50 +0100
committerTobi Oetiker <tobi@oetiker.ch>2009-01-05 08:52:50 +0100
commit64ad4077fc99a8476a27ad61c243db1077300286 (patch)
tree754d7a8d186805da4d5612cc94702638358cf57e /qooxdoo/source/perl/Qooxdoo/JSONRPC.pm
parent2a08e0d8ca5f3e2f64ca2771e20764a953515d2f (diff)
downloadsmokeping-64ad4077fc99a8476a27ad61c243db1077300286.tar.gz
smokeping-64ad4077fc99a8476a27ad61c243db1077300286.tar.xz
minor qooxdoo updates
Diffstat (limited to 'qooxdoo/source/perl/Qooxdoo/JSONRPC.pm')
-rw-r--r--qooxdoo/source/perl/Qooxdoo/JSONRPC.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/qooxdoo/source/perl/Qooxdoo/JSONRPC.pm b/qooxdoo/source/perl/Qooxdoo/JSONRPC.pm
index bf4541d..567250f 100644
--- a/qooxdoo/source/perl/Qooxdoo/JSONRPC.pm
+++ b/qooxdoo/source/perl/Qooxdoo/JSONRPC.pm
@@ -85,6 +85,8 @@ sub handle_request
my $error = new Qooxdoo::JSONRPC::error ($json);
+ $error->set_session($session);
+
my $script_transport_id = ScriptTransport_NotInUse;
#----------------------------------------------------------------------
@@ -251,7 +253,7 @@ sub handle_request
$@ = '';
$accessibility = eval $accessibility_method .
- '($method, $accessibility)';
+ '($method, $accessibility,$session)';
if ($@)
{
@@ -290,7 +292,7 @@ sub handle_request
$requestUriDomain .= ":" . $cgi->server_port
if $cgi->server_port != ($is_https ? 443 : 80);
- if ($cgi->referer !~ m|^(https?://[^/]*)|)
+ if ($cgi->referer and $cgi->referer !~ m|^(https?://[^/]*)|)
{
$error->set_error (JsonRpcError_PermissionDenied,
"Permission denied");
@@ -538,6 +540,14 @@ sub set_id
$self->{id} = $id;
}
+sub set_session
+{
+ my $self = shift;
+ my $session = shift;
+
+ $self->{session} = $session;
+}
+
sub set_script_transport_id
{
my $self = shift;