mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 02:39:14 +02:00
36 regex recognize token if not first URI parameter
This commit is contained in:

committed by
GitHub

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