Opened 3 years ago

Closed 2 years ago

#21612 closed defect (fixed)

Handle rehashing invalid fingerprints

Reported by: cypherpunks Owned by: irl
Priority: Medium Milestone:
Component: Metrics/Relay Search Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The search and details pages rehash given fingerprints using the hashFingerprints function before looking them up. This function isn't strict enough in detecting fingerprints which results in the function passing invalid hex strings to the jssha library. The library then gives the following error in the console and the page gets stuck on the loading screen.

uncaught exception: srcString of HEX type must be in byte increments

This is reproducible with the following urls

GOOD https://atlas.torproject.org/#details/BC630CBBB518BE7E9F4E09712AB0269E9DC7D626
BAD https://atlas.torproject.org/#details/BC630CBBB518BE7E9F4E09712AB0269E9DC7D6261

GOOD https://atlas.torproject.org/#search/BC630CBBB518BE7E9F4E09712AB0269E9DC7D626
BAD https://atlas.torproject.org/#search/BC630CBBB518BE7E9F4E09712AB0269E9DC7D6261

The fix is simple and a patch is coming once i get the ticket number.

Child Tickets

Attachments (1)

0001-Do-not-rehash-invalid-fingerprints.patch (1.8 KB) - added by cypherpunks 3 years ago.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by cypherpunks

comment:1 Changed 3 years ago by cypherpunks

Status: newneeds_review

comment:2 Changed 2 years ago by irl

Resolution: fixed
Status: needs_reviewclosed

Merged. Thanks.

Note: See TracTickets for help on using tickets.