<?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>282054</bug_id>
          
          <creation_ts>2024-10-24 11:37:38 -0700</creation_ts>
          <short_desc>HSTS should ignore strict-transport-security response headers from localhost</short_desc>
          <delta_ts>2024-11-08 07:42:59 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>Safari 18</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, HTML5, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Lawrence (MSFT)">ericlaw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>karlcow</cc>
    
    <cc>m_finkel</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2070394</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Lawrence (MSFT)">ericlaw</who>
    <bug_when>2024-10-24 11:37:38 -0700</bug_when>
    <thetext>https://issues.chromium.org/issues/41251622

Strict-Transport-Security response headers can cause problems for localhost web servers because STS applies host-wide, across all ports. This causes compatibility problems for web developers testing locally as well as end-users who use software packages that commonly spin up localhost webservers for ephemeral reasons (e.g. communication of an auth token from a web login to a local software package). If one local listener sets Strict-Transport-Security on a localhost response, it will be applied to all subsequent localhost requests regardless of port. We resolve this problem by ignoring Strict-Transport-Security headers on responses from localhost URLs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070422</commentid>
    <comment_count>1</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-10-24 14:27:23 -0700</bug_when>
    <thetext>Reportedly Firefox already does this. Eric posted a patch to standardize this behavior in Fetch here: https://github.com/whatwg/fetch/pull/1781

Seems reasonable enough to adopt.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070424</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Lawrence (MSFT)">ericlaw</who>
    <bug_when>2024-10-24 14:32:05 -0700</bug_when>
    <thetext>Yes, Firefox skips the HSTS upgrade check here:

https://searchfox.org/mozilla-central/source/netwerk/base/nsNetUtil.cpp#3040</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070563</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-10-25 07:44:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/138634128&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071649</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Lawrence (MSFT)">ericlaw</who>
    <bug_when>2024-10-30 10:52:09 -0700</bug_when>
    <thetext>Chromium change landed for M132: https://chromiumdash.appspot.com/commit/a5e738f2321ce1a2f3cdb34fa70dc76b84af9824</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073836</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Lawrence (MSFT)">ericlaw</who>
    <bug_when>2024-11-08 07:42:59 -0800</bug_when>
    <thetext>As of November 5, 2024, the Fetch standard has been updated to require skipping localhost.

https://fetch.spec.whatwg.org/#main-fetch</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>