diff options
author | James Moger <james.moger@gitblit.com> | 2014-09-06 11:25:42 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-09-07 11:42:40 -0400 |
commit | fc3a39d464b1303f0b7d01d0160f81cbbb80a98b (patch) | |
tree | 9a45d2f99aa1393198e8610221eb51e982e0d5af /src/test/java/com/gitblit/tests/LuceneExecutorTest.java | |
parent | 90eb5a08ddd6a3a246e8b73da9524c304838928a (diff) | |
download | gitblit-fc3a39d464b1303f0b7d01d0160f81cbbb80a98b.tar.gz gitblit-fc3a39d464b1303f0b7d01d0160f81cbbb80a98b.zip |
Create infrastructure for XSS sanitization
Diffstat (limited to 'src/test/java/com/gitblit/tests/LuceneExecutorTest.java')
-rw-r--r-- | src/test/java/com/gitblit/tests/LuceneExecutorTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/com/gitblit/tests/LuceneExecutorTest.java b/src/test/java/com/gitblit/tests/LuceneExecutorTest.java index 5c319e65..a8358b99 100644 --- a/src/test/java/com/gitblit/tests/LuceneExecutorTest.java +++ b/src/test/java/com/gitblit/tests/LuceneExecutorTest.java @@ -34,6 +34,8 @@ import com.gitblit.service.LuceneService; import com.gitblit.tests.mock.MemorySettings;
import com.gitblit.utils.FileUtils;
import com.gitblit.utils.JGitUtils;
+import com.gitblit.utils.XssFilter;
+import com.gitblit.utils.XssFilter.AllowXssFilter;
/**
* Tests Lucene indexing and querying.
@@ -48,7 +50,8 @@ public class LuceneExecutorTest extends GitblitUnitTest { private LuceneService newLuceneExecutor() {
MemorySettings settings = new MemorySettings();
settings.put(Keys.git.repositoriesFolder, GitBlitSuite.REPOSITORIES);
- RuntimeManager runtime = new RuntimeManager(settings, GitBlitSuite.BASEFOLDER).start();
+ XssFilter xssFilter = new AllowXssFilter();
+ RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
UserManager users = new UserManager(runtime, null).start();
RepositoryManager repos = new RepositoryManager(runtime, null, users);
return new LuceneService(settings, repos);
|