Closed Bug 1603746 Opened 1 year ago Closed 1 year ago

Pingsender's fallback destination validator misuses `find_first_of`

Categories

(Toolkit :: Telemetry, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: chutten, Assigned: janerik)

References

(Regression)

Details

Attachments

(1 file)

std::string's find_first_of is documented to do the following:

Searches the string for the first character that matches any of the characters specified in its arguments.

This means that url.find_first_of("http:") will find the first position in url that has any character of h, t, p, or :. This means https: urls will be incorrectly truncated, which will fail destination validation, which will fail to send the ping.

(on next startup TelemetrySend should find the unsent ping and send it using its logic, so this should only contribute to a delay in data being sent on *nix platforms without curl host parsing, not much missing data.)

Assignee: nobody → jrediger
Priority: -- → P1
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/07ec23676b97
Check url for protocol at the beginning of the string r=chutten
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.