Browse Source

Bugfix PW-Änderung und veraltete Saiku-beans.xml #10

kern_tomcat10_test_his
Daniel Quathamer 1 day ago
parent
commit
5e387574b9
  1. 9
      src/de/memtext/util/CryptUtils.java
  2. 2
      superx/WEB-INF/conf/edustore/db/install/conf/builddatum.txt
  3. 2
      superx/WEB-INF/conf/edustore/db/install/conf/kern.rtf
  4. 1
      superx/WEB-INF/conf/obsoletfiles.txt
  5. BIN
      superx/WEB-INF/lib/superx6.0.jar
  6. 118
      superx/WEB-INF/saiku/saiku-beans.xml
  7. 2
      superx/edit/kern/userinfo_edit_pw.inc

9
src/de/memtext/util/CryptUtils.java

@ -7,6 +7,7 @@ import java.util.StringTokenizer; @@ -7,6 +7,7 @@ import java.util.StringTokenizer;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.digest.Crypt;
/**
*
@ -77,7 +78,15 @@ public class CryptUtils { @@ -77,7 +78,15 @@ public class CryptUtils {
}
return encrypted.toString();
}
public static String encodeSHA512(String txt) {
if (txt ==null || txt.length() > 1000) {
throw new RuntimeException("Passwort ist ungültig");
}
byte txtArray[] = txt.getBytes();
return Crypt.crypt(txtArray, "$6$0q5233a66a3e9bea16f3139bfe4f6ce50ced591deafbc4b9ef56d6ae60fe9c4b22aa78dbd704bde57c");
}
public static String encryptSimple(String s) {
int i = 0;
byte pad[] = s.getBytes();

2
superx/WEB-INF/conf/edustore/db/install/conf/builddatum.txt

@ -1 +1 @@ @@ -1 +1 @@
21.01.2026
30.01.2026

2
superx/WEB-INF/conf/edustore/db/install/conf/kern.rtf

File diff suppressed because one or more lines are too long

1
superx/WEB-INF/conf/obsoletfiles.txt

@ -477,7 +477,6 @@ WEB-INF/lib/commons-lang3-3.4-javadoc.jar @@ -477,7 +477,6 @@ WEB-INF/lib/commons-lang3-3.4-javadoc.jar
WEB-INF/lib/commons-logging-1.0.3.jar
WEB-INF/lib/commons-logging-api.jar
WEB-INF/lib/commons-pool-1.2.jar
WEB-INF/lib/commons-vfs-1.0.jar
WEB-INF/lib/dom4j-1.6.1.jar
WEB-INF/lib/enunciate-core-annotations-1.25.jar
WEB-INF/lib/enunciate-core-rt-1.25.jar

BIN
superx/WEB-INF/lib/superx6.0.jar

Binary file not shown.

118
superx/WEB-INF/saiku/saiku-beans.xml

@ -0,0 +1,118 @@ @@ -0,0 +1,118 @@
<?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:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<context:property-placeholder location="/WEB-INF/saiku/saiku-beans.properties" ignore-resource-not-found="true" ignore-unresolvable="true" order="0" />
<context:property-placeholder location="file:///${ext.prop.dir}saiku-beans.properties" ignore-resource-not-found="true" ignore-unresolvable="true" order="-1" />
<bean id="repositoryDsManager" class="de.superx.saiku.SuperxRepositoryDataSourceManager" init-method="load" destroy-method="unload">
<property name="userService" ref="userServiceBean" />
<property name="configurationpath" value="${repoconfig}" />
<property name="datadir" value="${repodata}" />
<property name="defaultRole" value="${default.role}" />
<property name="externalPropertiesFile" value="${external.properties.file}" />
<property name="repoPasswordProvider" ref="repoPasswordProviderBean" />
<property name="datasource" ref="dataSource" />
</bean>
<bean id="repoPasswordProviderBean" class="org.saiku.service.util.security.authentication.SimplePasswordProvider">
<constructor-arg index="0" value="${webdav.password}" />
</bean>
<!--
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql://localhost:5432/eduetl_head?ApplicationName=saiku" />
<property name="username" value="postgres" />
<property name="password" value="postgres" />
</bean>
-->
<!-- a PlatformTransactionManager is still required
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
-->
<bean id="authorisationPredicate" class="org.saiku.service.util.security.authorisation.MustBeAuthenticatedAuthorisation" />
<bean id="sessionService" class="de.superx.saiku.SuperxSaikuSessionService">
<property name="authenticationManager" ref="authenticationManager" />
<property name="authorisationPredicate" ref="authorisationPredicate" />
</bean>
<bean id="securityContextPersistenceFilter" class="org.springframework.security.web.context.SecurityContextPersistenceFilter" />
<bean id="connectionManager" class="de.superx.saiku.SuperxSaikuConnectionManager" init-method="init">
<property name="dataSourceManager" ref="repositoryDsManager" />
<property name="dataSource" ref="dataSource" />
<property name="sessionService" ref="sessionService" />
<property name="userService" ref="userServiceBean" />
</bean>
<bean id="datasourceServiceBean" class="org.saiku.service.datasource.DatasourceService">
<property name="connectionManager" ref="connectionManager" />
</bean>
<bean id="userDAO" class="de.superx.saiku.SuperxUserDAO">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="userServiceBean" class="org.saiku.service.user.UserService">
<property name="jdbcUserDAO" ref="userDAO" />
<property name="datasourceService" ref="datasourceServiceBean" />
<property name="iDatasourceManager" ref="repositoryDsManager" />
<property name="adminRoles">
<list>
<value>ROLE_BI_ADMIN</value>
</list>
</property>
<property name="sessionService" ref="sessionService" />
</bean>
<bean id="adminBean" class="org.saiku.web.rest.resources.AdminResource">
<property name="userService" ref="userServiceBean" />
<property name="datasourceService" ref="datasourceServiceBean" />
<property name="olapDiscoverService" ref="olapDiscoverServiceBean" />
<property name="repositoryDatasourceManager" ref="repositoryDsManager" />
</bean>
<bean class="org.saiku.datasources.connection.MondrianVFS" init-method="init">
<property name="datasourceManager" ref="repositoryDsManager" />
</bean>
<bean id="olapDiscoverServiceBean" class="org.saiku.service.olap.OlapDiscoverService">
<property name="datasourceService" ref="datasourceServiceBean" />
</bean>
<bean id="olapQueryBean" scope="session" class="org.saiku.service.olap.OlapQueryService" destroy-method="destroy">
<property name="olapDiscoverService" ref="olapDiscoverServiceBean" />
</bean>
<bean id="datasourceResourceBean" class="org.saiku.web.rest.resources.DataSourceResource">
<property name="datasourceService" ref="datasourceServiceBean" />
</bean>
<bean id="olapDiscoverBean" scope="session" class="org.saiku.web.rest.resources.OlapDiscoverResource">
<property name="olapDiscoverService" ref="olapDiscoverServiceBean" />
</bean>
<bean id="queryResource" scope="request" class="org.saiku.web.rest.resources.QueryResource">
<property name="olapQueryService" ref="olapQueryBean" />
<property name="olapDiscoverService" ref="olapDiscoverServiceBean" />
</bean>
<bean id="thinQueryBean" scope="session" class="org.saiku.service.olap.ThinQueryService">
<property name="olapDiscoverService" ref="olapDiscoverServiceBean" />
</bean>
<bean id="platformBean" class="de.superx.saiku.SuperxPlatformUtilsService">
<property name="path" value="/saiku/js/saiku/plugins/" />
</bean>
<bean id="infoResource" class="org.saiku.web.rest.resources.InfoResource">
<property name="platformUtilsService" ref="platformBean" />
</bean>
<bean id="queryResource2" scope="request" class="org.saiku.web.rest.resources.Query2Resource">
<property name="thinQueryService" ref="thinQueryBean" />
<property name="repository" ref="repository2bean" />
</bean>
<bean id="sessionResource" class="org.saiku.web.rest.resources.SessionResource">
<property name="sessionService" ref="sessionService" />
<property name="userService" ref="userServiceBean" />
</bean>
<bean id="repository2bean" scope="request" class="org.saiku.web.rest.resources.BasicRepositoryResource2">
<property name="path" value="res:saiku-repository" />
<property name="sessionService" ref="sessionService" />
<property name="datasourceService" ref="datasourceServiceBean" />
</bean>
<bean id="filterRepositoryBean" scope="session" class="org.saiku.web.rest.resources.FilterRepositoryResource">
<property name="olapQueryService" ref="olapQueryBean" />
<property name="path" value="res:saiku-repository" />
</bean>
<bean id="exporterBean" scope="request" class="org.saiku.web.rest.resources.ExporterResource">
<property name="repository" ref="repository2bean" />
<property name="query2Resource" ref="queryResource2" />
</bean>
<bean id="statsBean" scope="singleton" class="org.saiku.web.rest.resources.StatisticsResource" />
<bean id="startupBean" scope="singleton" class="org.saiku.web.rest.util.StartupResource" init-method="init" />
<bean id="sxManager" class="de.superx.servlet.SuperXManager" />
</beans>

2
superx/edit/kern/userinfo_edit_pw.inc

@ -5,7 +5,7 @@ String pw=""; @@ -5,7 +5,7 @@ String pw="";
if(currentRow_userinfo.get("passwd_sha")!=null)
pw=currentRow_userinfo.get("passwd_sha").toString();
if(request.getParameter("newPW")!=null && !request.getParameter("newPW").toString().equals(""))
pw=de.memtext.util.CryptUtils.encodeSHA512(request.getParameter("newPW").toString());
pw=de.memtext.util.CryptUtils.encodeSHA(request.getParameter("newPW").toString());
%>

Loading…
Cancel
Save