summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-10-06 15:38:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:39 -0500
commit77fc14c0818498e277a79196fa4f6e15f4b607b1 (patch)
treef227fe426668875510327372f639bd8cfcfeb20f /swat
parent213f0d62f129e0bcf736a313efc4bf85d9406773 (diff)
downloadsamba-77fc14c0818498e277a79196fa4f6e15f4b607b1.tar.gz
samba-77fc14c0818498e277a79196fa4f6e15f4b607b1.tar.bz2
samba-77fc14c0818498e277a79196fa4f6e15f4b607b1.zip
r19140: allow own authentication handling by jsonrpc apps
(This used to be commit de2eb8df0c1aa361adbf14a5984b1719e17f70cb)
Diffstat (limited to 'swat')
-rw-r--r--swat/scripting/common.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/swat/scripting/common.js b/swat/scripting/common.js
index 299a67c702..fe25287a74 100644
--- a/swat/scripting/common.js
+++ b/swat/scripting/common.js
@@ -74,10 +74,18 @@ function page_footer() {
*/
function always_allowed(uri) {
var str = string_init();
+
+ /* allow jsonrpc-based applications to do their own authentication */
+ var s = str.split('/', uri);
+ if (s[0] == "" && s[1] == 'apps') {
+ return true;
+ }
+
var s = str.split('.', uri);
if (s.length < 2) {
return false;
}
+
var ext = s[s.length-1];
var allowed = new Array("ico", "gif", "png","css", "js");
for (i in allowed) {