summaryrefslogtreecommitdiff
path: root/src/ne_auth.c
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-02-29 16:22:18 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-02-29 16:22:18 +0000
commit6c646ad7271fa0245d5caff0e559ecd080daee98 (patch)
treed44f47c4141161556376c5f5c384af5abed108b1 /src/ne_auth.c
parentaf5c40a84d20f922010230397bf97a60cb0f62d1 (diff)
downloadneon-6c646ad7271fa0245d5caff0e559ecd080daee98.tar.gz
* src/ne_auth.c (inside_domain): Fix to treat domain as a prefix,
as required by 2617. * test/auth.c (domains): Tweak test case to cover this. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1389 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_auth.c')
-rw-r--r--src/ne_auth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ne_auth.c b/src/ne_auth.c
index 10bdae7..bc71cee 100644
--- a/src/ne_auth.c
+++ b/src/ne_auth.c
@@ -1,6 +1,6 @@
/*
HTTP Authentication routines
- Copyright (C) 1999-2007, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 1999-2008, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -820,9 +820,7 @@ static int inside_domain(auth_session *sess, const char *req_uri)
for (n = 0; n < sess->ndomains && !inside; n++) {
const char *d = sess->domains[n];
- inside = (d[strlen(d)-1] == '/'
- && strncmp(uri.path, d, strlen(d)) == 0)
- || strcmp(d, uri.path) == 0;
+ inside = strncmp(uri.path, d, strlen(d)) == 0;
}
NE_DEBUG(NE_DBG_HTTPAUTH, "auth: '%s' is inside auth domain: %d.\n",