Ver Fonte

Accept more characters in usernames

Zachary Kotlarek há 12 anos atrás
pai
commit
2c84c97b64
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      web/includes/myplex.php

+ 2 - 1
web/includes/myplex.php

@@ -6,7 +6,8 @@ function myplexToken($username, $password) {
 	global $PLEX_ID;
 	global $PLEX_AUTH_URL;
 
-	$username = preg_replace('/\W/', '_', $username);
+	# This probably forbids some allowed characters -- expand as needed
+	$username = preg_replace('/[^\w\@\-\+\.]/', '_', $username);
 	$token = false;
 
 	# Construct the headers