ソースを参照

Accept more characters in usernames

Zachary Kotlarek 12 年 前
親
コミット
2c84c97b64
1 ファイル変更、2 行追加、1 行削除
  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