From 32d7464e523e918fcad6d79aef44af3adbbb1732 Mon Sep 17 00:00:00 2001 From: mposolda Date: Thu, 14 Apr 2016 10:22:03 +0200 Subject: [PATCH 1/2] KEYCLOAK-2819 Fix realm security header setup after migration --- .../java/org/keycloak/migration/migrators/MigrateTo1_9_2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } From 5263101bc0b7efe8ef1b3d730229276cccef9b40 Mon Sep 17 00:00:00 2001 From: mposolda Date: Thu, 14 Apr 2016 10:41:31 +0200 Subject: [PATCH 2/2] KEYCLOAK-2820 Mongo doesn't start on wildfly --- .../mongo/DefaultMongoConnectionFactoryProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }