Opened 2 years ago

Closed 2 years ago

#27163 closed defect (fixed)

Regular expression for valid AS numbers doesn't allow for AS 0

Reported by: nusenu Owned by: irl
Priority: Medium Milestone:
Component: Metrics Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: karsten Sponsor:

Child Tickets

Change History (7)

comment:1 Changed 2 years ago by irl

Summary: search/as:AS0 --> HTTP 400Regular expression for valid AS numbers doesn't allow for AS 0

Broken when we added support for lists of AS numbers in #23713.

private static Pattern asNumberParameterPattern =
  Pattern.compile("((^|,)([aA][sS])?[1-9][0-9]{0,9})+$");

Should have been parse as a long and check it's 0 <= x <= 4294967295.

comment:2 Changed 2 years ago by irl

Owner: changed from metrics-team to irl
Status: newaccepted

comment:3 Changed 2 years ago by karsten

Oops. Should we put out a 6.2-1.17.1 with a fix and deploy that today or tomorrow?

comment:4 Changed 2 years ago by irl

I think probably we would have to do this tomorrow. I would like to have the time to write some extra test cases and also think about other fields that could do with more test cases.

comment:5 Changed 2 years ago by irl

Status: acceptedneeds_review

comment:6 Changed 2 years ago by karsten

Reviewer: karsten

comment:7 Changed 2 years ago by karsten

Resolution: fixed
Status: needs_reviewclosed

Looks good! Merged. Closing. Thanks!

Note: See TracTickets for help on using tickets.