[ljcom] r9832: LJSUP-7563: authorization don't work in ...
Committer: gariev
LJSUP-7563: authorization don't work in ljmob.ru on montana's serversU trunk/cgi-bin/LJ/SUP/RPC/Command/default.pm
Modified: trunk/cgi-bin/LJ/SUP/RPC/Command/default.pm
===================================================================
--- trunk/cgi-bin/LJ/SUP/RPC/Command/default.pm 2010-12-13 11:00:32 UTC (rev 9831)
+++ trunk/cgi-bin/LJ/SUP/RPC/Command/default.pm 2010-12-13 11:48:42 UTC (rev 9832)
@@ -56,9 +56,11 @@
die "Data should be send by POST method.\n"
unless LJ::did_post();
}
- if (($self->need_ssl) && (!$LJ::IS_DEV_SERVER)) {
- die "Not secure connection\n"
- unless $LJ::IS_SSL;
+ if ($self->need_ssl && !$LJ::IS_DEV_SERVER && !$LJ::IS_SSL) {
+ ## hack: allow unsecured (http) connections from inside
+ ## of Montana datacenter
+ my $ip_class = LJ::LJcom::ip_class();
+ die "Not secure connection\n" unless $ip_class eq 'mon_local';
}
# Should journal be specified?
