Be more forceful in identifying EBADPATH
Even when the path is first identified as a wildcard path.
*/
static apr_status_t test_safe_name(const char *name)
{
+ apr_status_t rv = APR_SUCCESS;
+
/* Only accept ':' in the second position of the filename,
* as the drive letter delimiter:
*/
@@ -41,13 +43,13 @@ static apr_status_t test_safe_name(const char *name)
while (*name) {
if (!IS_FNCHAR(*name) && (*name != '\\') && (*name != '/')) {
if (*name == '?' || *name == '*')
- return APR_EPATHWILD;
+ rv = APR_EPATHWILD;
else
return APR_EBADPATH;
}
++name;
}
- return APR_SUCCESS;
+ return rv;
}
static apr_status_t free_localheap(void *heap) {
