Closed Bug 1273686 Opened 4 years ago Closed 4 years ago

Reconsider argument validation in core ping

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 49
Tracking Status
firefox49 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In the extreme case, some values we store can overflow (e.g. sequence number), become -1 and put the device into a crash loop.
Might as well not crash loop and if we see issues on the server, we can fix things then.
Comment on attachment 8753594 [details]
MozReview Request: Bug 1273686 - Don't crash on invalid sequence number argument in core ping. r=ahunt

https://reviewboard.mozilla.org/r/53382/#review50410

::: mobile/android/base/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetryCorePingBuilder.java:42
(Diff revision 1)
>   *
>   * See https://gecko.readthedocs.org/en/latest/toolkit/components/telemetry/telemetry/core-ping.html
>   * for details on the core ping.
>   */
>  public class TelemetryCorePingBuilder extends TelemetryPingBuilder {
> +    private static final String LOGTAG = StringUtils.safeSubstring(TelemetryCorePingBuilder.class.getSimpleName(), 0, 23);

It's probably worth using AppGlobals.makeLogTag here?
Attachment #8753594 - Flags: review?(ahunt) → review+
https://reviewboard.mozilla.org/r/53382/#review50410

> It's probably worth using AppGlobals.makeLogTag here?

It uses `Stumbler_` as its prefix so I can't. But point noted, there should be a global way to define logtags – see bug 1242091.

Also, I'm not sure how the projects are built – gradle/intellij seems fine with me adding this code, but I'm afraid our moz.build system would divide our dependencies differently and preventing me from accessing this code.
https://hg.mozilla.org/mozilla-central/rev/8d6ba0802090
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
You need to log in before you can comment on or make changes to this bug.