Skip to content

Commit 048fc6e

Browse files
committed
Capture dollar sign in short-circuit var names
1 parent df8cff7 commit 048fc6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/java/dev/lavalink/youtube/cipher/SignatureCipherManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ private SignatureCipher extractFromScript(@NotNull String script, @NotNull Strin
286286
String nFunction = nFunctionMatcher.group(0);
287287
String nfParameterName = DataFormatTools.extractBetween(nFunction, "(", ")");
288288
// remove short-circuit that prevents n challenge transformation
289-
nFunction = nFunction.replaceAll("if\\s*\\(\\s*typeof\\s*\\w+\\s*===?.*?\\)\\s*return\\s+" + nfParameterName + "\\s*;?", "");
289+
nFunction = nFunction.replaceAll("if\\s*\\(\\s*typeof\\s*[\\w$]+\\s*===?.*?\\)\\s*return\\s+" + nfParameterName + "\\s*;?", "");
290290

291291
SignatureCipher cipherKey = new SignatureCipher(nFunction, scriptTimestamp.group(2), script);
292292

0 commit comments

Comments
 (0)