[freeside-commits] branch master updated. db27e4da24fa49d91215bd8ef7a05895fa58c0f6
Ivan
ivan at 420.am
Sat Mar 26 14:37:37 PDT 2016
The branch, master has been updated
via db27e4da24fa49d91215bd8ef7a05895fa58c0f6 (commit)
from a2408d6aa3cce0e3673ae75d14414178c4c24987 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit db27e4da24fa49d91215bd8ef7a05895fa58c0f6
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Mar 26 14:37:37 2016 -0700
webservice infrastructure, RT#33849
diff --git a/FS/FS/ClientAPI/Freeside.pm b/FS/FS/ClientAPI/Freeside.pm
index 90fa550..dcd3ed6 100644
--- a/FS/FS/ClientAPI/Freeside.pm
+++ b/FS/FS/ClientAPI/Freeside.pm
@@ -8,7 +8,7 @@ use FS::svc_external;
use FS::webservice_log;
#$DEBUG = 0;
-#$me = '[FS::ClientAPI::PrepaidPhone]';
+#$me = '[FS::ClientAPI:Freeside]';
# inputs:
# support-key
@@ -17,6 +17,7 @@ use FS::webservice_log;
#
# returns:
# error (empty, or error message)
+# custnum
sub freesideinc_service {
my $packet = shift;
@@ -36,8 +37,12 @@ sub freesideinc_service {
'_password' => $_password,
},
'extra_sql' => "AND svcpart = $svcpart",
- })
- or return { 'error' => 'bad support-key' };
+ });
+ unless ( $svc_external ) {
+ warn "bad support-key for $username from $ENV{REMOTE_IP}\n";
+ sleep 5; #ideally also rate-limit and eventually ban their IP
+ return { 'error' => 'bad support-key' };
+ }
#XXX check if some customers can use some API calls, rate-limiting, etc.
# but for now, everybody can use everything
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/Freeside.pm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list