<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>196709</bug_id>
          
          <creation_ts>2019-04-08 14:45:38 -0700</creation_ts>
          <short_desc>[ews-build] Scripts using Buildbot API have CORS error</short_desc>
          <delta_ts>2019-04-08 17:42:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aakash Jain">aakash_jain</reporter>
          <assigned_to name="Aakash Jain">aakash_jain</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>ap</cc>
    
    <cc>commit-queue</cc>
    
    <cc>lforschler</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1525384</commentid>
    <comment_count>0</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2019-04-08 14:45:38 -0700</bug_when>
    <thetext>Any script using Buildbot API will have CORS error, since buildbot is not setting CORS header appropriately. 

We need to set allowed_origins in Buildbot configuration as per: http://docs.buildbot.net/latest/manual/configuration/www.html#web-server</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525385</commentid>
    <comment_count>1</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2019-04-08 14:45:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/49710473&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525390</commentid>
    <comment_count>2</comment_count>
      <attachid>366985</attachid>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2019-04-08 14:48:43 -0700</bug_when>
    <thetext>Created attachment 366985
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525407</commentid>
    <comment_count>3</comment_count>
      <attachid>366985</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-04-08 15:03:02 -0700</bug_when>
    <thetext>Comment on attachment 366985
Patch

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

&gt; Tools/BuildSlaveSupport/ews-build/master.cfg:14
&gt; +c[&apos;www&apos;] = dict(port=8010, allowed_origins=[&quot;*&quot;])

This has security considerations that I wouldn&apos;t want to think through unless I have to.

What are the scripts that hit the error? Only JavaScript running in the browser is strictly subject to CORS. Some scripting also enables those checks, but that can always be disabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525458</commentid>
    <comment_count>4</comment_count>
      <attachid>366985</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-04-08 16:35:24 -0700</bug_when>
    <thetext>Comment on attachment 366985
Patch

OK, I think that this is fine. We have the same rules on build.webkit.org anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525488</commentid>
    <comment_count>5</comment_count>
      <attachid>366985</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-04-08 17:42:33 -0700</bug_when>
    <thetext>Comment on attachment 366985
Patch

Clearing flags on attachment: 366985

Committed r244060: &lt;https://trac.webkit.org/changeset/244060&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525489</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-04-08 17:42:34 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>366985</attachid>
            <date>2019-04-08 14:48:43 -0700</date>
            <delta_ts>2019-04-08 17:42:33 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-196709-20190408174945.patch</filename>
            <type>text/plain</type>
            <size>1096</size>
            <attacher name="Aakash Jain">aakash_jain</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI0NDA0OCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDEyIEBACisyMDE5LTA0LTA4ICBBYWthc2ggSmFpbiAgPGFha2FzaF9qYWluQGFwcGxlLmNv
bT4KKworICAgICAgICBbZXdzLWJ1aWxkXSBTY3JpcHRzIHVzaW5nIEJ1aWxkYm90IEFQSSBoYXZl
IENPUlMgZXJyb3IKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dp
P2lkPTE5NjcwOQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAg
ICAgICogQnVpbGRTbGF2ZVN1cHBvcnQvZXdzLWJ1aWxkL21hc3Rlci5jZmc6IFNldCBhbGxvd2Vk
X29yaWdpbnMgYXBwcm9wcmlhdGVseS4KKwogMjAxOS0wNC0wOCAgQWFrYXNoIEphaW4gIDxhYWth
c2hfamFpbkBhcHBsZS5jb20+CiAKICAgICAgICAgW2V3cy1idWlsZF0gRG8gbm90IHVwbG9hZCBh
cmNoaXZlIHdoZW4gQ29tcGlsZSBGYWlscwpJbmRleDogVG9vbHMvQnVpbGRTbGF2ZVN1cHBvcnQv
ZXdzLWJ1aWxkL21hc3Rlci5jZmcKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gVG9vbHMvQnVpbGRTbGF2ZVN1cHBv
cnQvZXdzLWJ1aWxkL21hc3Rlci5jZmcJKHJldmlzaW9uIDI0NDA0NikKKysrIFRvb2xzL0J1aWxk
U2xhdmVTdXBwb3J0L2V3cy1idWlsZC9tYXN0ZXIuY2ZnCSh3b3JraW5nIGNvcHkpCkBAIC0xMSw3
ICsxMSw3IEBAIGlzX3Rlc3RfbW9kZV9lbmFibGVkID0gb3MuZ2V0ZW52KCdCVUlMREIKIAogYyA9
IEJ1aWxkbWFzdGVyQ29uZmlnID0ge30KIAotY1snd3d3J10gPSBkaWN0KHBvcnQ9ODAxMCkKK2Nb
J3d3dyddID0gZGljdChwb3J0PTgwMTAsIGFsbG93ZWRfb3JpZ2lucz1bIioiXSkKIAogY1snd3d3
J11bJ3VpX2RlZmF1bHRfY29uZmlnJ10gPSB7IAogICAgICdCdWlsZGVycy5zaG93X3dvcmtlcnNf
bmFtZSc6IFRydWUsCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>