<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  Panifex platform
  Copyright (C) 2013  <NAME>
  
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or any later version.
  
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  
  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-->
<blueprint 
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.osgi.org/xmlns/blueprint/v1.0.0
            http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
        http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
            http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">

    <cm:property-placeholder persistent-id="org.panifex.web" update-strategy="reload">
        <cm:default-properties>
            <cm:property name="loginUrl" value=""/>
            <cm:property name="passwordParam" value=""/>
            <cm:property name="rememberMeParam" value=""/>
            <cm:property name="successUrl" value=""/>
            <cm:property name="usernameParam" value=""/>
            <cm:property name="welcomeUrl" value=""/>
        </cm:default-properties>
    </cm:property-placeholder>

    <!-- Environment -->

    <bean id="environmentLoader"
            class="org.panifex.security.shiro.env.ModularEnvironmentLoader">
        <property name="environment" ref="environment"/>
    </bean>

    <bean id="environment"
            class="org.panifex.security.shiro.env.ModularWebEnvironment">
        <argument ref="filterChainManager"/>
    </bean>

    <reference-list interface="org.panifex.module.api.security.AuthenticationService"
            availability="optional">
        <reference-listener ref="environment"
            bind-method="bindAuthenticationService"
            unbind-method="unbindAuthenticationService"/>
    </reference-list>

    <reference-list interface="org.panifex.module.api.security.AuthorizationService"
            availability="optional">
        <reference-listener ref="environment"
            bind-method="bindAuthorizationService"
            unbind-method="unbindAuthorizationService"/>
    </reference-list>

    <!-- Sec Filter Mapping Map -->

    <bean id="filterMappingMap"
        class="org.panifex.security.shiro.mgt.SecFilterMappingMapImpl"/>

    <!-- Filter Chain Manager -->

    <bean id="filterChainManager"
            class="org.panifex.security.shiro.mgt.ModularFilterChainManager">
        <argument ref="filterMappingMap"/>
    </bean>

    <reference-list interface="org.panifex.module.api.security.SecFilter"
            availability="optional">
        <reference-listener ref="filterChainManager"
            bind-method="bindFilter"
            unbind-method="unbindFilter"/>
    </reference-list>

    <reference-list interface="org.panifex.module.api.security.SecFilterMapping"
            availability="optional">
        <reference-listener ref="filterChainManager"
            bind-method="bindFilterMapping"
            unbind-method="unbindFilterMapping"/>
    </reference-list>

    <!-- Security Filter -->

    <service ref="securityFilter" interface="javax.servlet.Filter">
        <service-properties>
            <entry key="urlPatterns" value="/*"/>
        </service-properties>
    </service>

    <bean id="securityFilter"
            class="org.panifex.security.shiro.SecurityFilterImpl">
        <property name="environmentLoader" ref="environmentLoader"/>
        <property name="loginUrl" value="${loginUrl}"/>
        <property name="passwordParam" value="${passwordParam}"/>
        <property name="rememberMeParam" value="${rememberMeParam}"/>
        <property name="successUrl" value="${successUrl}"/>
        <property name="usernameParam" value="${usernameParam}"/>
    </bean>

    <!-- Redirect to welcome url servlet -->

    <service ref="welcomeUrlRedirectServlet" interface="javax.servlet.Servlet">
        <service-properties>
            <entry key="urlPatterns" value="/*"/>
        </service-properties>
    </service>
    
    <bean id="welcomeUrlRedirectServlet"
            class="org.panifex.security.shiro.WelcomeUrlRedirectServlet">
        <property name="welcomeUrl" value="${welcomeUrl}"/>
    </bean>

</blueprint><commit_msg>Maps WelcomeUrlRedirectServlet to root path '/' instead of '/*'<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  Panifex platform
  Copyright (C) 2013  <NAME>
  
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or any later version.
  
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  
  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-->
<blueprint 
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.osgi.org/xmlns/blueprint/v1.0.0
            http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
        http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
            http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">

    <cm:property-placeholder persistent-id="org.panifex.web" update-strategy="reload">
        <cm:default-properties>
            <cm:property name="loginUrl" value=""/>
            <cm:property name="passwordParam" value=""/>
            <cm:property name="rememberMeParam" value=""/>
            <cm:property name="successUrl" value=""/>
            <cm:property name="usernameParam" value=""/>
            <cm:property name="welcomeUrl" value=""/>
        </cm:default-properties>
    </cm:property-placeholder>

    <!-- Environment -->

    <bean id="environmentLoader"
            class="org.panifex.security.shiro.env.ModularEnvironmentLoader">
        <property name="environment" ref="environment"/>
    </bean>

    <bean id="environment"
            class="org.panifex.security.shiro.env.ModularWebEnvironment">
        <argument ref="filterChainManager"/>
    </bean>

    <reference-list interface="org.panifex.module.api.security.AuthenticationService"
            availability="optional">
        <reference-listener ref="environment"
            bind-method="bindAuthenticationService"
            unbind-method="unbindAuthenticationService"/>
    </reference-list>

    <reference-list interface="org.panifex.module.api.security.AuthorizationService"
            availability="optional">
        <reference-listener ref="environment"
            bind-method="bindAuthorizationService"
            unbind-method="unbindAuthorizationService"/>
    </reference-list>

    <!-- Sec Filter Mapping Map -->

    <bean id="filterMappingMap"
        class="org.panifex.security.shiro.mgt.SecFilterMappingMapImpl"/>

    <!-- Filter Chain Manager -->

    <bean id="filterChainManager"
            class="org.panifex.security.shiro.mgt.ModularFilterChainManager">
        <argument ref="filterMappingMap"/>
    </bean>

    <reference-list interface="org.panifex.module.api.security.SecFilter"
            availability="optional">
        <reference-listener ref="filterChainManager"
            bind-method="bindFilter"
            unbind-method="unbindFilter"/>
    </reference-list>

    <reference-list interface="org.panifex.module.api.security.SecFilterMapping"
            availability="optional">
        <reference-listener ref="filterChainManager"
            bind-method="bindFilterMapping"
            unbind-method="unbindFilterMapping"/>
    </reference-list>

    <!-- Security Filter -->

    <service ref="securityFilter" interface="javax.servlet.Filter">
        <service-properties>
            <entry key="urlPatterns" value="/*"/>
        </service-properties>
    </service>

    <bean id="securityFilter"
            class="org.panifex.security.shiro.SecurityFilterImpl">
        <property name="environmentLoader" ref="environmentLoader"/>
        <property name="loginUrl" value="${loginUrl}"/>
        <property name="passwordParam" value="${passwordParam}"/>
        <property name="rememberMeParam" value="${rememberMeParam}"/>
        <property name="successUrl" value="${successUrl}"/>
        <property name="usernameParam" value="${usernameParam}"/>
    </bean>

    <!-- Redirect to welcome url servlet -->

    <service ref="welcomeUrlRedirectServlet" interface="javax.servlet.Servlet">
        <service-properties>
            <entry key="urlPatterns" value="/"/>
        </service-properties>
    </service>
    
    <bean id="welcomeUrlRedirectServlet"
            class="org.panifex.security.shiro.WelcomeUrlRedirectServlet">
        <property name="welcomeUrl" value="${welcomeUrl}"/>
    </bean>

</blueprint>
{'fraction_non_alphanumeric': 0.13357731015553523, 'fraction_numerical': 0.008742502795567755, 'mean_word_length': 3.017149857084524, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 2, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 18}, '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': '7061609', 'n_tokens_mistral': 2758, 'n_tokens_neox': 2691, 'n_words': 550}