<?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>183292</bug_id>
          
          <creation_ts>2018-03-02 09:35:00 -0800</creation_ts>
          <short_desc>Investigate usage of XMLHttpRequest&apos;s Permissions Policy usage</short_desc>
          <delta_ts>2024-03-16 01:00:23 -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>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>202098</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=183300</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>183300</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian Clelland">iclelland</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>cdumez</cc>
    
    <cc>ggaren</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1403259</commentid>
    <comment_count>0</comment_count>
    <who name="Ian Clelland">iclelland</who>
    <bug_when>2018-03-02 09:35:00 -0800</bug_when>
    <thetext>XMLHttpRequest objects can have their behavior controlled by feature policy
(https://github.com/whatwg/xhr/pull/177, not merged yet)

If the policy in the active document disallows the &apos;sync-xhr&apos; feature, then calling .send() on the XMLHttpRequest object should throw a NetworkError (and ideally log a message to the developer console)

Demo: https://xhr.featurepolicy.rocks/
GitHub issue: https://github.com/whatwg/xhr/issues/178
Web Platform Tests: https://wpt.fyi/xhr/xmlhttprequest-sync-default-feature-policy.sub.html

Feature policy itself has been partially implemented as part of https://bugs.webkit.org/show_bug.cgi?id=167430, but I haven&apos;t found another bug for the rest of the implementation. Let me know if I should file that as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403271</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-03-02 09:46:55 -0800</bug_when>
    <thetext>Hi Ian,

I guess that if there are other bugs related to feature policy that are filed, maybe having an umbrella bug might be useful.

The current feature policy &quot;implementation&quot; is minimal in that it only checks for the iframe attribute, (no headers checking) and is specific to media capture.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403344</commentid>
    <comment_count>2</comment_count>
    <who name="Ian Clelland">iclelland</who>
    <bug_when>2018-03-02 13:21:04 -0800</bug_when>
    <thetext>Thanks, Youenn --- I filed https://bugs.webkit.org/show_bug.cgi?id=183300; I&apos;m not sure if bugzilla allows me to declare a dependency of this bug on that one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2021309</commentid>
    <comment_count>3</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-03-15 05:58:15 -0700</bug_when>
    <thetext>Letting a top-level site adjust the control flow of an embedded site is generally not a good idea. This has also been removed from XMLHttpRequest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2021310</commentid>
    <comment_count>4</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-03-15 06:08:36 -0700</bug_when>
    <thetext>Actually, there is something implemented. Maybe that needs to be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2021568</commentid>
    <comment_count>5</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-03-16 01:00:23 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 202098 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>