36 regex recognize token if not first URI parameter

This commit is contained in:
Christoph Walther
2023-11-03 12:21:48 +01:00
committed by GitHub
parent df0b9ffbe7
commit 9ff4cd3af7

View File

@@ -13,7 +13,7 @@ const modules: Ref<Module[]> = ref(moduleStore().modules);
function extractToken(token: string): string { function extractToken(token: string): string {
const tokenRegex = /^[a-z0-9]{15}$/; const tokenRegex = /^[a-z0-9]{15}$/;
const tokenUriRegex = /\?token=([a-z0-9]{15})(?:&|$)/; const tokenUriRegex = /(?:\?|&)token=([a-z0-9]{15})(?:&|$)/;
if (tokenRegex.test(token)) { if (tokenRegex.test(token)) {
return token; return token;