Restrict GalleryDetailUrlParser token to 10 characters
This commit is contained in:
1 parent
5b961d71b8
commit
a1a82b0ce9
2 files changed
+2
-1
No files matched your search
@@ -34,7 +34,7 @@ public final class GalleryDetailUrlParser {
|
||||
"https?://(?:" + EhUrl.DOMAIN_EX + "|" + EhUrl.DOMAIN_E + "|" + EhUrl.DOMAIN_LOFI + ")/(?:g|mpv)/(\\d+)/([0-9a-f]{10})");
|
||||
|
||||
private static final Pattern URL_PATTERN = Pattern.compile(
|
||||
"(\\d+)/([0-9a-f]{10})");
|
||||
"(\\d+)/([0-9a-f]{10})(?:[^0-9a-f]|$)");
|
||||
|
||||
@Nullable
|
||||
public static Result parse(String url) {
|
||||
|
||||
@@ -43,6 +43,7 @@ public class GalleryDetailUrlParserTest {
|
||||
{ "530350/8b3c7e4a21", false, false, 530350, "8b3c7e4a21" },
|
||||
{ "g/530350/8b3c7e4a21", false, false, 530350, "8b3c7e4a21" },
|
||||
{ "530350b/8b3c7e4a21", false, true, 0, null },
|
||||
{ "530350/8b3c7e4a211", false, true, 0, null },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user