summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/tests/LdapAuthenticationTest.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-09-06 11:25:42 -0400
committerJames Moger <james.moger@gitblit.com>2014-09-07 11:42:40 -0400
commitfc3a39d464b1303f0b7d01d0160f81cbbb80a98b (patch)
tree9a45d2f99aa1393198e8610221eb51e982e0d5af /src/test/java/com/gitblit/tests/LdapAuthenticationTest.java
parent90eb5a08ddd6a3a246e8b73da9524c304838928a (diff)
downloadgitblit-fc3a39d464b1303f0b7d01d0160f81cbbb80a98b.tar.gz
gitblit-fc3a39d464b1303f0b7d01d0160f81cbbb80a98b.zip
Create infrastructure for XSS sanitization
Diffstat (limited to 'src/test/java/com/gitblit/tests/LdapAuthenticationTest.java')
-rw-r--r--src/test/java/com/gitblit/tests/LdapAuthenticationTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/java/com/gitblit/tests/LdapAuthenticationTest.java b/src/test/java/com/gitblit/tests/LdapAuthenticationTest.java
index 646f7e9f..7c84ecc2 100644
--- a/src/test/java/com/gitblit/tests/LdapAuthenticationTest.java
+++ b/src/test/java/com/gitblit/tests/LdapAuthenticationTest.java
@@ -39,6 +39,8 @@ import com.gitblit.manager.UserManager;
import com.gitblit.models.TeamModel;
import com.gitblit.models.UserModel;
import com.gitblit.tests.mock.MemorySettings;
+import com.gitblit.utils.XssFilter;
+import com.gitblit.utils.XssFilter.AllowXssFilter;
import com.unboundid.ldap.listener.InMemoryDirectoryServer;
import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig;
import com.unboundid.ldap.listener.InMemoryListenerConfig;
@@ -96,7 +98,8 @@ public class LdapAuthenticationTest extends GitblitUnitTest {
}
private LdapAuthProvider newLdapAuthentication(IStoredSettings settings) {
- RuntimeManager runtime = new RuntimeManager(settings, GitBlitSuite.BASEFOLDER).start();
+ XssFilter xssFilter = new AllowXssFilter();
+ RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
userManager = new UserManager(runtime, null).start();
LdapAuthProvider ldap = new LdapAuthProvider();
ldap.setup(runtime, userManager);
@@ -104,7 +107,8 @@ public class LdapAuthenticationTest extends GitblitUnitTest {
}
private AuthenticationManager newAuthenticationManager(IStoredSettings settings) {
- RuntimeManager runtime = new RuntimeManager(settings, GitBlitSuite.BASEFOLDER).start();
+ XssFilter xssFilter = new AllowXssFilter();
+ RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
AuthenticationManager auth = new AuthenticationManager(runtime, userManager);
auth.addAuthenticationProvider(newLdapAuthentication(settings));
return auth;