mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Allow consecutive points
This commit is contained in:
parent
0efa73d96c
commit
51eeb89f67
@ -76,18 +76,15 @@ static bool validate(const char *s) {
|
|||||||
for (char c; (c = *s); ++s) {
|
for (char c; (c = *s); ++s) {
|
||||||
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
|
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
|
||||||
(c >= '0' && c <= '9') || c == '_' || c == ':') {
|
(c >= '0' && c <= '9') || c == '_' || c == ':') {
|
||||||
dot = false;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c == '.') {
|
if (c == '.') {
|
||||||
if (dot) // No consecutive dots
|
|
||||||
return false;
|
|
||||||
dot = true;
|
dot = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return dot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int add_list(const char *pkg, const char *proc = "") {
|
static int add_list(const char *pkg, const char *proc = "") {
|
||||||
|
Loading…
Reference in New Issue
Block a user