mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
switch authentication to sha1
This commit is contained in:
parent
e405cd03f6
commit
4ebe929d60
4 changed files with 178 additions and 10 deletions
11
ApiClient.js
11
ApiClient.js
|
@ -1061,11 +1061,8 @@ var ApiClient = {
|
|||
var url = ApiClient.getUrl("Users/" + userId + "/authenticate");
|
||||
|
||||
var postData = {
|
||||
password: SHA1(password || "")
|
||||
};
|
||||
|
||||
if (password) {
|
||||
postData.password = password;
|
||||
}
|
||||
|
||||
return $.ajax({
|
||||
type: "POST",
|
||||
|
@ -1093,9 +1090,7 @@ var ApiClient = {
|
|||
var postData = {
|
||||
};
|
||||
|
||||
if (currentPassword) {
|
||||
postData.currentPassword = currentPassword;
|
||||
}
|
||||
postData.currentPassword = SHA1(currentPassword);
|
||||
if (newPassword) {
|
||||
postData.newPassword = newPassword;
|
||||
}
|
||||
|
@ -1117,7 +1112,7 @@ var ApiClient = {
|
|||
var postData = {
|
||||
};
|
||||
|
||||
postData.resetPassword = 1;
|
||||
postData.resetPassword = true;
|
||||
return $.post(url, postData);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue