Bug 195477

Summary: [ews-app] Add support for submit-to-ews url
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, dean_johnson, dewei_zhu, kocsen_chung, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
lforschler: review+
Patch for landing none

Description Aakash Jain 2019-03-08 13:51:27 PST
We should add submit-to-ews url support, so as to submit the patch ids manually to EWS. This would also be required to make the 'Submit for EWS analysis' button work.
Comment 1 Aakash Jain 2019-03-08 14:20:31 PST
Created attachment 364065 [details]
Proposed patch
Comment 2 dewei_zhu 2019-03-08 14:38:33 PST
Comment on attachment 364065 [details]
Proposed patch

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

> Tools/BuildSlaveSupport/ews-app/ews/fetcher.py:53
> +    def fetch(self, patch_ids=None):
> +        if not patch_ids:
> +            patch_ids = Bugzilla.get_list_of_patches_needing_reviews()

We may want to check the type of patch_ids here. BugzillaPatchFetcher().fetch(1) will cause exceptions in next line.

> Tools/BuildSlaveSupport/ews-app/ews/views/submittoews.py:40
> +@method_decorator(csrf_exempt, name='dispatch')

Do we have a security justification for not having csrf here?
Comment 3 Aakash Jain 2019-03-11 10:48:02 PDT
Created attachment 364269 [details]
Patch for landing

> We may want to check the type of patch_ids here.
Added the check.

> Do we have a security justification for not having csrf here?
Removed csrf_exempt decorator. Updated templates accordingly (by adding {% csrf_token %})
Comment 4 WebKit Commit Bot 2019-03-11 11:22:07 PDT
Comment on attachment 364269 [details]
Patch for landing

Clearing flags on attachment: 364269

Committed r242719: <https://trac.webkit.org/changeset/242719>
Comment 5 WebKit Commit Bot 2019-03-11 11:22:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-03-11 11:24:47 PDT
<rdar://problem/48774381>