Bug 191351 - "/api/report" does not check commit time correctly.
Summary: "/api/report" does not check commit time correctly.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: dewei_zhu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-07 00:48 PST by dewei_zhu
Modified: 2018-11-12 15:48 PST (History)
2 users (show)

See Also:


Attachments
Patch (5.59 KB, patch)
2018-11-07 00:51 PST, dewei_zhu
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewei_zhu 2018-11-07 00:48:31 PST
"/api/report' does not check commit time correctly.
Comment 1 dewei_zhu 2018-11-07 00:51:49 PST
Created attachment 354070 [details]
Patch
Comment 2 dewei_zhu 2018-11-07 16:43:10 PST
Landed in r237953.
Tracked in <rdar://problem/45894683>
Comment 3 Ryosuke Niwa 2018-11-12 15:48:50 PST
Comment on attachment 354070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=354070&action=review

> Websites/perf.webkit.org/public/include/report-processor.php:175
> +
> +            if ($commit_data['time'] && abs(strtotime($commit_row['commit_time']) - strtotime($commit_data['time'])) > 1.0)

Why don't we just call Database::to_js_time and check that the difference is less than 1000ms?