Bug 195477 - [ews-app] Add support for submit-to-ews url
Summary: [ews-app] Add support for submit-to-ews url
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-08 13:51 PST by Aakash Jain
Modified: 2019-03-11 11:24 PDT (History)
8 users (show)

See Also:


Attachments
Proposed patch (7.39 KB, patch)
2019-03-08 14:20 PST, Aakash Jain
lforschler: review+
Details | Formatted Diff | Diff
Patch for landing (7.47 KB, patch)
2019-03-11 10:48 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>