Changeset ea9884


Ignore:
Timestamp:
Aug 2, 2008, 6:18:50 PM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
50271b
Parents:
9fb97c
Message:

ensure that identityObject holds only valid id and smtp information

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_helper.js

    r9fb97c rea9884  
    5454    getSMTPname : function (smtpKey) {
    5555        if (!this.SMTP_NAMES) this.__getSMTPnames();
    56         return this.SMTP_NAMES[smtpKey]?this.SMTP_NAMES[smtpKey]:(smtpKey?this.DEFAULT_TAG+" "+smtpKey+" not found":this.DEFAULT_TAG)
     56        return this.SMTP_NAMES[smtpKey]?this.SMTP_NAMES[smtpKey]:this.DEFAULT_TAG
    5757    },
    5858    getIDname : function (idKey) {
    5959        if (!this.ID_NAMES) this.__getIDnames();
    60         return this.ID_NAMES[idKey]?this.ID_NAMES[idKey]:(idKey?this.DEFAULT_TAG+" "+idKey+" not found":this.DEFAULT_TAG)
     60        return this.ID_NAMES[idKey]?this.ID_NAMES[idKey]:this.DEFAULT_TAG
    6161    },
     62    isValidSMTP : function (smtpKey) {
     63        if (!this.SMTP_NAMES) this.__getSMTPnames();
     64        return (!smtpKey || this.SMTP_NAMES[smtpKey]?true:false)
     65    },
     66    isValidID : function (idKey) {
     67        if (!this.ID_NAMES) this.__getIDnames();
     68        return (!idKey || this.ID_NAMES[idKey]?true:false)
     69    }
    6270}
    6371
  • chrome/content/v_identity/vI_storage.js

    r9fb97c rea9884  
    3636    this.extras = extras;
    3737    this.__keyTranslator = new keyTranslator();
     38    if (!this.__keyTranslator.isValidID(this.id)) this.id = ""
     39    if (!this.__keyTranslator.isValidSMTP(this.smtp)) this.smtp = "";
    3840}
    3941identityData.prototype = {
Note: See TracChangeset for help on using the changeset viewer.