Remove LOGIN parameter (login, ownCloud, sso) (Security fix)

Code refactoring
This commit is contained in:
RainLoop Team 2014-06-26 20:11:49 +04:00
parent cd448ffe91
commit 5d84af4458
22 changed files with 393 additions and 488 deletions

View file

@ -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;
};