<commit_before><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:security="http://www.springframework.org/schema/security"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/security
                           http://www.springframework.org/schema/security/spring-security-3.2.xsd">


    <security:http pattern="/js/highcharts" security="none" />
    <security:http pattern="/css/**" security="none" />
    <security:http pattern="/img/**" security="none" />
    <security:http pattern="/rocketmq/**" security="none" />
    <security:http pattern="/**/captcha-image" security="none" />
    <security:http pattern="/cockpit/register" security="none" />
    <security:http pattern="/cockpit/login" security="none" />
    <security:http pattern="/error" security="none" />

    <security:http auto-config="true" use-expressions="false">
        <security:custom-filter ref="rocketMQLoginFilter" before="FORM_LOGIN_FILTER" />
        <security:intercept-url pattern="/cockpit/login.jsp" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <security:intercept-url pattern="/cockpit/captcha-image.jsp" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <security:intercept-url pattern="/j_spring_security_check" access="IS_AUTHENTICATED_ANONYMOUSLY"/>

        <security:intercept-url pattern="/cockpit/manage/**" access="ROLE_ADMIN"/>
        <security:intercept-url pattern="/**" access="ROLE_USER, ROLE_ADMIN"/>

        <security:form-login authentication-failure-handler-ref="rocketMQUserLoginFailedHandler"
                             authentication-success-handler-ref="rocketMQUserLoginSuccessHandler"
                             default-target-url="/"
                             login-page="/cockpit/login.jsp"
                             authentication-failure-url="/cockpit/login.jsp?error=true"/>

        <!-- Use the comment out line in production -->
        <!--
        <security:intercept-url pattern="/**" access="ROLE_ADMIN" requires-channel="https" />
        -->
        <security:session-management>
            <security:concurrency-control max-sessions="1" error-if-maximum-exceeded="false"  />
        </security:session-management>

        <security:access-denied-handler ref="accessDeniedHandler" />
    </security:http>

    <security:authentication-manager alias="authenticationManager">
        <security:authentication-provider  user-service-ref="userDetailService"><commit_msg>Use session fixation<commit_after><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:security="http://www.springframework.org/schema/security"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/security
                           http://www.springframework.org/schema/security/spring-security-3.2.xsd">


    <security:http pattern="/js/highcharts" security="none" />
    <security:http pattern="/css/**" security="none" />
    <security:http pattern="/img/**" security="none" />
    <security:http pattern="/rocketmq/**" security="none" />
    <security:http pattern="/**/captcha-image" security="none" />
    <security:http pattern="/cockpit/register" security="none" />
    <security:http pattern="/cockpit/login" security="none" />
    <security:http pattern="/error" security="none" />

    <security:http auto-config="true" use-expressions="false">
        <security:custom-filter ref="rocketMQLoginFilter" before="FORM_LOGIN_FILTER" />
        <security:intercept-url pattern="/cockpit/login.jsp" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <security:intercept-url pattern="/cockpit/captcha-image.jsp" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <security:intercept-url pattern="/j_spring_security_check" access="IS_AUTHENTICATED_ANONYMOUSLY"/>

        <security:intercept-url pattern="/cockpit/manage/**" access="ROLE_ADMIN"/>
        <security:intercept-url pattern="/**" access="ROLE_USER, ROLE_ADMIN"/>

        <security:form-login authentication-failure-handler-ref="rocketMQUserLoginFailedHandler"
                             authentication-success-handler-ref="rocketMQUserLoginSuccessHandler"
                             default-target-url="/"
                             login-page="/cockpit/login.jsp"
                             authentication-failure-url="/cockpit/login.jsp?error=true"/>

        <!-- Use the comment out line in production -->
        <!--
        <security:intercept-url pattern="/**" access="ROLE_ADMIN" requires-channel="https" />
        -->
        <security:session-management session-fixation-protection="none">
            <security:concurrency-control max-sessions="1" error-if-maximum-exceeded="false"  />
        </security:session-management>

        <security:access-denied-handler ref="accessDeniedHandler" />
    </security:http>

    <security:authentication-manager alias="authenticationManager">
        <security:authentication-provider  user-service-ref="userDetailService">
{'fraction_non_alphanumeric': 0.15275735294117648, 'fraction_numerical': 0.004044117647058824, 'mean_word_length': 3.121969696969697, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 2, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 8}, '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': '5397969', 'n_tokens_mistral': 1540, 'n_tokens_neox': 1499, 'n_words': 174}