mod_http_cache: fixed validation of S3 URL

This commit is contained in:
Chris Rienzo committed 2014-02-10 08:54:43 -05:00
1 parent adcf3fb26b
commit 259337ca57
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@
int aws_s3_is_s3_url(const char *url)
{
/* AWS bucket naming rules are complex... this match only supports virtual hosting of buckets */
return !zstr(url) && switch_regex_match(url, "^https?://\\w[\\w.]{1,61}\\w\\.s3([-\\w]+)?\\.amazonaws\\.com/.*$") == SWITCH_STATUS_SUCCESS;
return !zstr(url) && switch_regex_match(url, "^https?://\\w[-\\w.]{1,61}\\w\\.s3([-\\w]+)?\\.amazonaws\\.com/.*$") == SWITCH_STATUS_SUCCESS;
}
/**