瀏覽代碼

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