Skip to content

Commit 4316acc

Browse files
committed
Add more checks for spaces
1 parent e5219ac commit 4316acc

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
@@ -277,7 +277,7 @@ private SignatureCipher extractFromScript(@NotNull String script, @NotNull Strin
277277
String nFunction = nFunctionMatcher.group(0);
278278
String nfParameterName = DataFormatTools.extractBetween(nFunction, "(", ")");
279279
// remove short-circuit that prevents n challenge transformation
280-
nFunction = nFunction.replaceAll("if\\s*\\(typeof\\s*\\w+\\s*===?.*?\\)return " + nfParameterName + "\\s*;?", "");
280+
nFunction = nFunction.replaceAll("if\\s*\\(\\s*typeof\\s*\\w+\\s*===?.*?\\)\\s*return " + nfParameterName + "\\s*;?", "");
281281

282282
SignatureCipher cipherKey = new SignatureCipher(nFunction, scriptTimestamp.group(2), script);
283283

0 commit comments

Comments
 (0)