mongos does not validate port and accepts values outside of valid range

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin, Usability
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      mongos does not validate port and accepts values outside of valid range.

      This was found when I added port validation to MMS (there are users running with values outside the normal range in production).

      I started mongos using:

      • mongos --port 87161 --configdb localhost:27022
      mongos> db.mongos.find().pretty();
      {
      	"_id" : "my.local:27017",
      	"mongoVersion" : "2.4.4",
      	"ping" : ISODate("2013-07-02T19:10:40.901Z"),
      	"up" : 256,
      	"waiting" : true
      }
      {
      	"_id" : "my.local:27030",
      	"mongoVersion" : "2.4.4",
      	"ping" : ISODate("2013-07-02T19:10:40.445Z"),
      	"up" : 252,
      	"waiting" : true
      }
      {
      	"_id" : "my.local:87161",
      	"mongoVersion" : "2.4.4",
      	"ping" : ISODate("2013-07-02T19:10:41.305Z"),
      	"up" : 184,
      	"waiting" : true
      }
      

              Assignee:
              Unassigned
              Reporter:
              Ryan Nitz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: