[metrics-bugs] #27163 [Metrics]: Regular expression for valid AS numbers doesn't allow for AS 0 (was: search/as:AS0 --> HTTP 400)
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Aug 16 11:29:52 UTC 2018
#27163: Regular expression for valid AS numbers doesn't allow for AS 0
---------------------+------------------------------
Reporter: nusenu | Owner: metrics-team
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Metrics | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------+------------------------------
Comment (by irl):
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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27163#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list