Sfoglia il codice sorgente

Prevent username and password from being submitted to Ombi and Tautulli when using oauth to login.

Roark 7 anni fa
parent
commit
d7cc48f8b2
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      api/functions/sso-functions.php

+ 4 - 4
api/functions/sso-functions.php

@@ -32,8 +32,8 @@ function getOmbiToken($username, $password, $oAuthToken = null)
 			"Content-Type" => "application/json"
 		);
 		$data = array(
-			"username" => $username,
-			"password" => $password,
+			"username" => ($oAuthToken ? "" : $username),
+			"password" => ($oAuthToken ? "" : $password),
 			"rememberMe" => "true",
 			"plexToken" => $oAuthToken
 		);
@@ -66,8 +66,8 @@ function getTautulliToken($username, $password, $plexToken = null)
 					"User-Agent" => isset($_SERVER ['HTTP_USER_AGENT']) ? $_SERVER ['HTTP_USER_AGENT'] : null
 				);
 				$data = array(
-					"username" => $username,
-					"password" => $password,
+			                "username" => ($plexToken ? "" : $username),
+			                "password" => ($plexToken ? "" : $password),
 					"token" => $plexToken,
 					"remember_me" => 1,
 				);