mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Only add password to the form post if not null or empty
This commit is contained in:
parent
8fc828361e
commit
90c609c159
1 changed files with 6 additions and 1 deletions
|
@ -353,7 +353,12 @@ namespace MediaBrowser.ApiInteraction
|
|||
string url = ApiUrl + "/UserAuthentication?dataformat=" + SerializationFormat.ToString();
|
||||
|
||||
// Create the post body
|
||||
string postContent = string.Format("userid={0}&password={1}", userId, password);
|
||||
string postContent = string.Format("userid={0}", userId);
|
||||
|
||||
if (!string.IsNullOrEmpty(password))
|
||||
{
|
||||
postContent += "&password=" + password;
|
||||
}
|
||||
|
||||
HttpContent content = new StringContent(postContent, Encoding.UTF8, "application/x-www-form-urlencoded");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue