As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 810680 - add proper port number checking into the Account manager where missing
: add proper port number checking into the Account manager where missing
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Account Manager (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 24.0
Assigned To: :aceman
:
:
Mentors:
Depends on: 80855 327812 1050840
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-11 06:16 PST by :aceman
Modified: 2014-09-17 14:51 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (9.87 KB, patch)
2013-04-29 14:20 PDT, :aceman
iann_bugzilla: review+
Details | Diff | Splinter Review
patch v2 (9.05 KB, patch)
2013-05-21 12:07 PDT, :aceman
mconley: review+
Details | Diff | Splinter Review

Description User image :aceman 2012-11-11 06:16:13 PST
Add checks of validity of port number as is done for hostname in the account manager (bug 327812).
Add a new function into hostnameUtils.jsm to check for port number validity.
Make the textboxes taking a port number numeric and set proper range on them. This is already done on the mail server port and the LDAP server in addressbook, but is missing for SMTP server port.
Comment 1 User image :aceman 2013-04-29 14:20:37 PDT
Created attachment 743286 [details] [diff] [review]
patch

I couldn't find a place where to use the new function...
Comment 2 User image Ian Neal 2013-05-06 16:45:11 PDT
(In reply to :aceman from comment #1)
> Created attachment 743286 [details] [diff] [review]
> patch
> 
> I couldn't find a place where to use the new function...

Well http://mxr.mozilla.org/comm-central/source/mailnews/base/prefs/content/accountcreation/sanitizeDatatypes.js#35 sort of does the job already.
Comment 3 User image :aceman 2013-05-06 23:28:43 PDT
Yes, but that is only for the account creation.
Comment 4 User image Ian Neal 2013-05-20 15:48:53 PDT
Comment on attachment 743286 [details] [diff] [review]
patch

I rather, if there is nothing to use isValidPort, just not add that function.
r=me with that function removed.
Comment 5 User image :aceman 2013-05-21 12:07:58 PDT
Created attachment 752306 [details] [diff] [review]
patch v2

Thanks.
Comment 6 User image Ryan VanderMeulen [:RyanVM] 2013-06-03 05:41:28 PDT
https://hg.mozilla.org/comm-central/rev/5731f3541e4e

Note You need to log in before you can comment on or make changes to this bug.