Отображение тегов безопасности в HTML вместо оценки - PullRequest
0 голосов
/ 27 марта 2019

Я выполняю обновления зависимостей для моего приложения, и после обновления adminfaces-spring-boot-starter с 3.2.6 до 4.0.x теги безопасности отображаются в HTML, что явно нарушает функциональность и полностью ставит под угрозу его использование..

Похоже, что ни одно руководство по миграции не рассматривало эту проблему.Ниже приведен фрагмент файла сборки Gradle и пример безопасности.

    /* Spring dependencies */
    compile("org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-validation:2.1.3.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-data-jpa:2.1.3.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-thymeleaf:2.1.3.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-mail:2.1.3.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-security:2.1.3.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-log4j2:2.1.3.RELEASE")
    testCompile("org.springframework.boot:spring-boot-starter-test:2.1.3.RELEASE")
    testCompile("com.h2database:h2:1.4.197")
    if(buildWar) {
        providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:2.1.3.RELEASE")

    compile("org.joinfaces:adminfaces-spring-boot-starter:4.0.3"){
        exclude group: 'org.glassfish'
        exclude group: 'com.github.adminfaces', module: 'admin-theme'
    }
    }

Обратите внимание, что та же конфигурация работает с версией 3.2.6, исключения обрабатываются правильно.

<ui:composition ...
    xmlns:security="http://www.springframework.org/security/tags">
    <ui:define name="title">
    </ui:define>

    <ui:define name="body">
        <security:authorize access="hasAnyAuthority('some_authority', 'some_other_authority')">
            <ui:include src="pages/documents/buttons.xhtml" />
        </security:authorize>
        <ui:include src="pages/documents/documents_list.xhtml" />
    </ui:define>
</ui:composition>

Я могу подтвердить, что аутентификация правильно зарегистрирована через SecurityContextHolder после входа в систему.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...