mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Remove LOGIN parameter (login, ownCloud, sso) (Security fix)
Code refactoring
This commit is contained in:
parent
cd448ffe91
commit
5d84af4458
22 changed files with 393 additions and 488 deletions
|
|
@ -5,16 +5,10 @@
|
|||
*/
|
||||
function AbstractCacheStorage()
|
||||
{
|
||||
this.oEmailsPicsHashes = {};
|
||||
this.oServices = {};
|
||||
this.bCapaGravatar = RL.capa(Enums.Capa.Gravatar);
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
AbstractCacheStorage.prototype.oEmailsPicsHashes = {};
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
|
|
@ -28,7 +22,6 @@ AbstractCacheStorage.prototype.bCapaGravatar = false;
|
|||
AbstractCacheStorage.prototype.clear = function ()
|
||||
{
|
||||
this.oServices = {};
|
||||
this.oEmailsPicsHashes = {};
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -42,19 +35,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
|
|||
var
|
||||
sUrl = '',
|
||||
sService = '',
|
||||
sEmailLower = sEmail.toLowerCase(),
|
||||
sPicHash = Utils.isUnd(this.oEmailsPicsHashes[sEmailLower]) ? '' : this.oEmailsPicsHashes[sEmailLower]
|
||||
sEmailLower = sEmail.toLowerCase()
|
||||
;
|
||||
|
||||
if ('' !== sPicHash)
|
||||
{
|
||||
sUrl = RL.link().getUserPicUrlFromHash(sPicHash);
|
||||
}
|
||||
else
|
||||
{
|
||||
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
|
||||
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
|
||||
}
|
||||
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
|
||||
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
|
||||
|
||||
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
|
||||
{
|
||||
|
|
@ -75,11 +60,3 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
|
|||
{
|
||||
this.oServices = oData;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oData
|
||||
*/
|
||||
AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
||||
{
|
||||
this.oEmailsPicsHashes = oData;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue