diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/backend-rpc.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 8eacb199e..6792fae7f 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -1128,6 +1128,22 @@ return; } + if ($subop == "verifyRegexp") { + $reg_exp = $_REQUEST["reg_exp"]; + + print "<rpc-reply><status>"; + + if (@preg_match("/$reg_exp/i", "TEST") === false) { + print "INVALID"; + } else { + print "OK"; + } + + print "</status></rpc-reply>"; + + return; + } + print "<rpc-reply><error>Unknown method: $subop</error></rpc-reply>"; } ?> |