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

@ -985,16 +985,6 @@ RainLoopApp.prototype.getContactsTagsAutocomplete = function (sQuery, fCallback)
}));
};
RainLoopApp.prototype.emailsPicsHashes = function ()
{
RL.remote().emailsPicsHashes(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
RL.cache().setEmailsPicsHashesData(oData.Result);
}
});
};
/**
* @param {string} sMailToUrl
* @returns {boolean}
@ -1190,8 +1180,6 @@ RainLoopApp.prototype.bootstart = function ()
_.delay(function () {
RL.emailsPicsHashes();
RL.remote().servicesPics(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{

View file

@ -214,15 +214,6 @@ LinkBuilder.prototype.langLink = function (sLang)
return this.sServer + '/Lang/0/' + encodeURI(sLang) + '/' + this.sVersion + '/';
};
/**
* @param {string} sHash
* @return {string}
*/
LinkBuilder.prototype.getUserPicUrlFromHash = function (sHash)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/UserPic/' + sHash + '/' + this.sVersion + '/';
};
/**
* @return {string}
*/

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

View file

@ -728,14 +728,6 @@ WebMailAjaxRemoteStorage.prototype.servicesPics = function (fCallback)
this.defaultRequest(fCallback, 'ServicesPics');
};
/**
* @param {?Function} fCallback
*/
WebMailAjaxRemoteStorage.prototype.emailsPicsHashes = function (fCallback)
{
this.defaultRequest(fCallback, 'EmailsPicsHashes');
};
/**
* @param {?Function} fCallback
*/