diff --git a/model/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java b/model/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java index f66c989eff..3bc9c7a6a9 100755 --- a/model/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java +++ b/model/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java @@ -180,7 +180,7 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro private Class[] getManagedEntities() throws ClassNotFoundException { Class[] entityClasses = new Class[entities.length]; for (int i = 0; i < entities.length; i++) { - entityClasses[i] = Thread.currentThread().getContextClassLoader().loadClass(entities[i]); + entityClasses[i] = getClass().getClassLoader().loadClass(entities[i]); } return entityClasses; } diff --git a/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_2.java b/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_2.java index 7eb1f075dd..2473937382 100644 --- a/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_2.java +++ b/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_2.java @@ -34,7 +34,7 @@ public class MigrateTo1_9_2 { if (realm.getBrowserSecurityHeaders() != null) { Map browserSecurityHeaders = new HashMap<>(realm.getBrowserSecurityHeaders()); - browserSecurityHeaders.put("xFrameOptions", "nosniff"); + browserSecurityHeaders.put("xContentTypeOptions", "nosniff"); realm.setBrowserSecurityHeaders(Collections.unmodifiableMap(browserSecurityHeaders)); }