<commit_before><?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       version="2.4">

  <display-name>xwiki</display-name>
  <description>XWiki Application</description>
  
  <!-- Restlet Application class name -->
  <context-param>
    <param-name>org.restlet.application</param-name>
    <param-value>
      org.xwiki.rest.XWikiRestletJaxRsApplication  
    </param-value>
  </context-param> 
  
  <!-- Filter that sets a custom encoding to all requests, since usually clients don't specificy
       the encoding used for submitting the request, so by default containers fall back to the
       encoding globally configured in their settings. This allows XWiki to use a custom encoding,
       without affecting the whole container (and the other applications hosted). -->
  <filter>
    <filter-name>Set Character Encoding</filter-name>
    <filter-class>com.xpn.xwiki.web.SetCharacterEncodingFilter</filter-class>
    <!-- The encoding to use. This must be the same as the one in xwiki.cfg (hopefully only one
         encoding will be used later). -->
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <!-- Whether to ignore and override the encoding specified by the client, when this actually
         happens. For example, AJAX requests made through XmlHttpRequests specify UTF-8. When this
         is set to false, the custom encoding is used only when there wasn't any encoding specified
         by the client. -->
    <init-param>
      <param-name>ignore</param-name>
      <param-value>false</param-value>
    </init-param>
  </filter>

  <!-- A filter that allows requests to be saved and reused later. For example when the current request contains an expired
       authentication token, and the authorization module redirects to the login page, all the information sent by the
       client would be lost; this filter allows to save all that information, and after a successful login, injects the
       saved data in the new request. -->
  <filter>
    <filter-name>RequestRestorer</filter-name>
    <filter-class>com.xpn.xwiki.web.SavedRequestRestorerFilter</filter-class>
  </filter>

  <!-- This filter is used to convert the HTML generated by the WYSIWYG editor to wiki syntax -->
  <filter>
    <filter-name>ConversionFilter</filter-name>
    <filter-class>com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter</filter-class>
  </filter>

  <!-- Filter used to 'steal' webdav requests made to the application root -->
  <filter>
    <filter-name>DavFilter</filter-name>
    <filter-class>com.xpn.xwiki.plugin.webdav.XWikiDavFilter</filter-class>
  </filter>

  <!-- A filter that dispatches requests to the right action depending on the button pressed in the editing form. This
       is needed when javascript is disabled, since the browser cannot send the form data to different URLs depending on
       the button pressed. -->
  <filter>
    <filter-name>ActionDispatcher</filter-name>
    <filter-class>com.xpn.xwiki.web.ActionFilter</filter-class>
  </filter>

  <!-- This filter is used to initialize the XWiki context before processing a request. -->
  <filter>
    <filter-name>XWikiContextInitializationFilter</filter-name>
    <filter-class>com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter</filter-class>
  </filter>

  <!-- This filter is used to initialize the XWiki context before processing a XML-RPC request. -->
  <filter>
    <filter-name>XWikiXmlRpcContextInitializationFilter</filter-name>
    <filter-class>com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter</filter-class>
    <!-- A parameter used to identify the request as a an XML-RPC call -->
    <init-param>
      <param-name>mode</param-name>
      <param-value>2</param-value>
    </init-param>
  </filter>

  <!-- The encoding filter MUST always be the first one, as setting the encoding does not work after accessing the request data. -->
  <filter-mapping>
    <filter-name>Set Character Encoding</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>RequestRestorer</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ConversionFilter</filter-name>
    <servlet-name>action</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>DavFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ActionDispatcher</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>XWikiContextInitializationFilter</filter-name>
    <servlet-name>gwtrpc</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher><commit_msg>XWIKI-5096: Prevent ActionFilter from being called recursively and map it only to the action servlet.<commit_after><?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       version="2.4">

  <display-name>xwiki</display-name>
  <description>XWiki Application</description>
  
  <!-- Restlet Application class name -->
  <context-param>
    <param-name>org.restlet.application</param-name>
    <param-value>
      org.xwiki.rest.XWikiRestletJaxRsApplication  
    </param-value>
  </context-param> 
  
  <!-- Filter that sets a custom encoding to all requests, since usually clients don't specificy
       the encoding used for submitting the request, so by default containers fall back to the
       encoding globally configured in their settings. This allows XWiki to use a custom encoding,
       without affecting the whole container (and the other applications hosted). -->
  <filter>
    <filter-name>Set Character Encoding</filter-name>
    <filter-class>com.xpn.xwiki.web.SetCharacterEncodingFilter</filter-class>
    <!-- The encoding to use. This must be the same as the one in xwiki.cfg (hopefully only one
         encoding will be used later). -->
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <!-- Whether to ignore and override the encoding specified by the client, when this actually
         happens. For example, AJAX requests made through XmlHttpRequests specify UTF-8. When this
         is set to false, the custom encoding is used only when there wasn't any encoding specified
         by the client. -->
    <init-param>
      <param-name>ignore</param-name>
      <param-value>false</param-value>
    </init-param>
  </filter>

  <!-- A filter that allows requests to be saved and reused later. For example when the current request contains an expired
       authentication token, and the authorization module redirects to the login page, all the information sent by the
       client would be lost; this filter allows to save all that information, and after a successful login, injects the
       saved data in the new request. -->
  <filter>
    <filter-name>RequestRestorer</filter-name>
    <filter-class>com.xpn.xwiki.web.SavedRequestRestorerFilter</filter-class>
  </filter>

  <!-- This filter is used to convert the HTML generated by the WYSIWYG editor to wiki syntax -->
  <filter>
    <filter-name>ConversionFilter</filter-name>
    <filter-class>com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter</filter-class>
  </filter>

  <!-- Filter used to 'steal' webdav requests made to the application root -->
  <filter>
    <filter-name>DavFilter</filter-name>
    <filter-class>com.xpn.xwiki.plugin.webdav.XWikiDavFilter</filter-class>
  </filter>

  <!-- A filter that dispatches requests to the right action depending on the button pressed in the editing form. This
       is needed when javascript is disabled, since the browser cannot send the form data to different URLs depending on
       the button pressed. -->
  <filter>
    <filter-name>ActionDispatcher</filter-name>
    <filter-class>com.xpn.xwiki.web.ActionFilter</filter-class>
  </filter>

  <!-- This filter is used to initialize the XWiki context before processing a request. -->
  <filter>
    <filter-name>XWikiContextInitializationFilter</filter-name>
    <filter-class>com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter</filter-class>
  </filter>

  <!-- This filter is used to initialize the XWiki context before processing a XML-RPC request. -->
  <filter>
    <filter-name>XWikiXmlRpcContextInitializationFilter</filter-name>
    <filter-class>com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter</filter-class>
    <!-- A parameter used to identify the request as a an XML-RPC call -->
    <init-param>
      <param-name>mode</param-name>
      <param-value>2</param-value>
    </init-param>
  </filter>

  <!-- The encoding filter MUST always be the first one, as setting the encoding does not work after accessing the request data. -->
  <filter-mapping>
    <filter-name>Set Character Encoding</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>RequestRestorer</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ConversionFilter</filter-name>
    <servlet-name>action</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>DavFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ActionDispatcher</filter-name>
    <servlet-name>action</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

  <filter-mapping>
    <filter-name>XWikiContextInitializationFilter</filter-name>
    <servlet-name>gwtrpc</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>FORWARD</dispatcher>
{'fraction_non_alphanumeric': 0.12231315765806278, 'fraction_numerical': 0.004856551848187786, 'mean_word_length': 3.527687296416938, 'pattern_counts': {'":': 0, '<': 299, '<?xml version=': 2, '>': 299, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6985468', 'n_tokens_mistral': 3432, 'n_tokens_neox': 3311, 'n_words': 844}