mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-18 02:05:13 +00:00
Validate the URL fixed inefficient usage of find
This commit is contained in:
parent
ca87df7d44
commit
25375a6b48
@ -4740,7 +4740,7 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
|||||||
length = host.length();
|
length = host.length();
|
||||||
}
|
}
|
||||||
// Check url for http / https protocol string
|
// Check url for http / https protocol string
|
||||||
if((host.find("https://") != 0) && (host.find("http://") != 0)) {
|
if((host.compare(0, 8, "https://") != 0) && (host.compare(0, 7, "http://") != 0)) {
|
||||||
S3FS_PRN_EXIT("option url has invalid format, missing http / https protocol");
|
S3FS_PRN_EXIT("option url has invalid format, missing http / https protocol");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user