<?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>239651</bug_id>
          
          <creation_ts>2022-04-22 03:54:29 -0700</creation_ts>
          <short_desc>[GLib] Make WebKitSettings XSS auditor functions no-op</short_desc>
          <delta_ts>2022-05-26 19:12:22 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=239538</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=240993</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=235151</see_also>
          <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>
          <dependson>239772</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zan Dobersek">zan</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>aperez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>pnormand</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1863614</commentid>
    <comment_count>0</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-04-22 03:54:29 -0700</bug_when>
    <thetext>[GLib] Make WebKitSettings XSS auditor functions no-op</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1863616</commentid>
    <comment_count>1</comment_count>
      <attachid>458135</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-04-22 03:55:52 -0700</bug_when>
    <thetext>Created attachment 458135
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1863617</commentid>
    <comment_count>2</comment_count>
      <attachid>458135</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-04-22 04:03:53 -0700</bug_when>
    <thetext>Comment on attachment 458135
Patch

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

&gt; Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:1824
&gt; +    g_warning(&quot;webkit_settings_get_enable_xss_auditor is deprecated and always returns FALSE. XSS auditor is no longer supported.&quot;);

It would be nice to use g_warning_once(), but that was added in GLib 2.64
which is newer than our minimum GLib requirement, so let&apos;s just leave this
as-is. Anyway, I don&apos;t expect any program to have many calls to these
functions, and therefore there shouldn&apos;t be logging spam due to this 🤔️</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1863620</commentid>
    <comment_count>3</comment_count>
      <attachid>458135</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-04-22 04:09:12 -0700</bug_when>
    <thetext>Comment on attachment 458135
Patch

Clearing flags on attachment: 458135

Committed r293215 (249884@trunk): &lt;https://commits.webkit.org/249884@trunk&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1863621</commentid>
    <comment_count>4</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-04-22 04:09:17 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864317</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-25 17:37:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/92304443&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864318</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-25 17:38:02 -0700</bug_when>
    <thetext>Would be good to deprecate these too</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864483</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 09:20:26 -0700</bug_when>
    <thetext>Ah, oops, we actually need to revert this: it prints whenever constructing a WebKitSettings object because the property setter calls these functions.

I don&apos;t think we need runtime warnings. It would be sufficient to just deprecate the functions (WEBKIT_API -&gt; WEBKIT_DEPRECATED in the header file, and Deprecated: 2.38 annotation in the source file). I&apos;ll follow up on that in bug #239538 if you don&apos;t beat me to it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864485</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2022-04-26 09:21:33 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 239772</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864503</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 09:49:30 -0700</bug_when>
    <thetext>Actually I&apos;ll just do that here, it&apos;s quick/easy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864506</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 10:13:56 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #7)
&gt; Ah, oops, we actually need to revert this: it prints whenever constructing a
&gt; WebKitSettings object because the property setter calls these functions.

Also it looks like this broke &gt;200 API tests, but nobody noticed. The API tests were already in bad shape.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864509</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 10:16:44 -0700</bug_when>
    <thetext>https://github.com/WebKit/WebKit/pull/389</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864783</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-04-27 06:16:53 -0700</bug_when>
    <thetext>Committed r293507 (250038@main): &lt;https://commits.webkit.org/250038@main&gt;

Reviewed commits have been landed. Closing PR #389 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865386</commentid>
    <comment_count>13</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2022-04-29 02:00:10 -0700</bug_when>
    <thetext>And now we get a bunch of build warnings, can this be avoided?

[1727/2070] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/UIProcess/API/glib/WebKitSettings.cpp.o
/app/webkit/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:232:9: warning: &apos;webkit_settings_set_enable_xss_auditor&apos; is deprecated [-Wdeprecated-declarations]
        webkit_settings_set_enable_xss_auditor(settings, g_value_get_boolean(value));
        ^
/app/webkit/Source/WebKit/UIProcess/API/gtk/WebKitSettings.h:141:55: note: &apos;webkit_settings_set_enable_xss_auditor&apos; has been explicitly marked deprecated here
__attribute__((visibility(&quot;default&quot;))) __attribute__((__deprecated__)) void
                                                      ^
/app/webkit/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:434:36: warning: &apos;webkit_settings_get_enable_xss_auditor&apos; is deprecated [-Wdeprecated-declarations]
        g_value_set_boolean(value, webkit_settings_get_enable_xss_auditor(settings));
                                   ^
/app/webkit/Source/WebKit/UIProcess/API/gtk/WebKitSettings.h:138:55: note: &apos;webkit_settings_get_enable_xss_auditor&apos; has been explicitly marked deprecated here
__attribute__((visibility(&quot;default&quot;))) __attribute__((__deprecated__)) gboolean
                                                      ^
2 warnings generated.
[1934/2070] Building CXX object Tools/TestWebKitAPI/glib/CMakeFiles/TestWebKitSettings.dir/__/Tests/WebKitGLib/TestWebKitSettings.cpp.o
/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:76:76: warning: &apos;webkit_settings_get_enable_xss_auditor&apos; is deprecated [-Wdeprecated-declarations]
    do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (!(webkit_settings_get_enable_xss_auditor(settings))) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) ; else g_assertion_message (((gchar*) 0), &quot;/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp&quot;, 76, ((const char*) (__PRETTY_FUNCTION__)), &quot;&apos;&quot; &quot;webkit_settings_get_enable_xss_auditor(settings)&quot; &quot;&apos; should be FALSE&quot;); } while (0);
                                                                           ^
/app/webkit/WebKitBuild/Release/WebKit2Gtk/Headers/webkit2/WebKitSettings.h:138:55: note: &apos;webkit_settings_get_enable_xss_auditor&apos; has been explicitly marked deprecated here
__attribute__((visibility(&quot;default&quot;))) __attribute__((__deprecated__)) gboolean
                                                      ^
/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:77:5: warning: &apos;webkit_settings_set_enable_xss_auditor&apos; is deprecated [-Wdeprecated-declarations]
    webkit_settings_set_enable_xss_auditor(settings, (!(0)));
    ^
/app/webkit/WebKitBuild/Release/WebKit2Gtk/Headers/webkit2/WebKitSettings.h:141:55: note: &apos;webkit_settings_set_enable_xss_auditor&apos; has been explicitly marked deprecated here
__attribute__((visibility(&quot;default&quot;))) __attribute__((__deprecated__)) void
                                                      ^
/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:78:76: warning: &apos;webkit_settings_get_enable_xss_auditor&apos; is deprecated [-Wdeprecated-declarations]
    do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (!(webkit_settings_get_enable_xss_auditor(settings))) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) ; else g_assertion_message (((gchar*) 0), &quot;/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp&quot;, 78, ((const char*) (__PRETTY_FUNCTION__)), &quot;&apos;&quot; &quot;webkit_settings_get_enable_xss_auditor(settings)&quot; &quot;&apos; should be FALSE&quot;); } while (0);
                                                                           ^
/app/webkit/WebKitBuild/Release/WebKit2Gtk/Headers/webkit2/WebKitSettings.h:138:55: note: &apos;webkit_settings_get_enable_xss_auditor&apos; has been explicitly marked deprecated here
__attribute__((visibility(&quot;default&quot;))) __attribute__((__deprecated__)) gboolean
                                                      ^
3 warnings generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865415</commentid>
    <comment_count>14</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-29 06:50:22 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #13)
&gt; And now we get a bunch of build warnings, can this be avoided?

Oops, not sure how I missed this. Yes, they should be suppressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865419</commentid>
    <comment_count>15</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-29 07:11:01 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #14)
&gt; Oops, not sure how I missed this.

Ah, the answer is: too many other warnings that I haven&apos;t fixed yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865489</commentid>
    <comment_count>16</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-29 11:52:17 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/441</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865787</commentid>
    <comment_count>17</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-05-02 02:32:41 -0700</bug_when>
    <thetext>Committed r293660 (250164@main): &lt;https://commits.webkit.org/250164@main&gt;

Reviewed commits have been landed. Closing PR #441 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872234</commentid>
    <comment_count>18</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-26 18:05:48 -0700</bug_when>
    <thetext>I forgot to deprecate the property WebKitSettings:enable-xss-auditor, because I am incompetent. I think we all knew that already, though. ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872236</commentid>
    <comment_count>19</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-26 18:09:17 -0700</bug_when>
    <thetext>Bug #240993.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>458135</attachid>
            <date>2022-04-22 03:55:52 -0700</date>
            <delta_ts>2022-04-22 04:09:12 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-239651-20220422125551.patch</filename>
            <type>text/plain</type>
            <size>2363</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjkzMjEwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IGM2ODVkZTdjY2VlMTJlNTQw
YzljNjQ3YzI0MGI1YjMyMTUxODE2YjEuLjQxY2Y5YWY3NWM0YThkMTRmODdiNTBjYzRlZTczZjBm
YzlmY2NhM2YgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTkgQEAKKzIwMjItMDQtMjIgIFphbiBEb2Jl
cnNlayAgPHpkb2JlcnNla0BpZ2FsaWEuY29tPgorCisgICAgICAgIFtHTGliXSBNYWtlIFdlYktp
dFNldHRpbmdzIFhTUyBhdWRpdG9yIGZ1bmN0aW9ucyBuby1vcAorICAgICAgICBodHRwczovL2J1
Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjM5NjUxCisKKyAg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