Explorar o código

Accept more characters in usernames

Zachary Kotlarek %!s(int64=12) %!d(string=hai) anos
pai
achega
2c84c97b64
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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_ID;
 	global $PLEX_AUTH_URL;
 	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;
 	$token = false;
 
 
 	# Construct the headers
 	# Construct the headers