Skip to content
Snippets Groups Projects
Commit 15d2305d authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Merge branch '2.1' into 2.2

parents d77c02da ac0612fb
Branches
Tags
No related merge requests found
# Changelog # Changelog
## 2.1.2
This release fixes a security vulnerability caused by the CORS implementation.
Support for cross-origin requests has been removed. Use ARSnova version 2.2 or
newer for proper CORS. (Reported by Rainer Rillke at Wikimedia)
Additional changes:
* Libraries have been upgraded to fix potential bugs
## 2.0.4
This release fixes a security vulnerability caused by the CORS implementation.
Support for cross-origin requests has been removed. Use ARSnova version 2.2 or
newer for proper CORS. (Reported by Rainer Rillke at Wikimedia)
Additional changes:
* Libraries have been upgraded to fix potential bugs
## 2.2.1 ## 2.2.1
This release fixes a security vulnerability in the account management API. It is This release fixes a security vulnerability in the account management API. It is
highly recommended to upgrade if you are using database authentication. highly recommended to upgrade if you are using database authentication.
......
...@@ -181,12 +181,12 @@ ...@@ -181,12 +181,12 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>1.7.12</version> <version>1.7.21</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<version>1.7.12</version> <version>1.7.21</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
<dependency> <dependency>
<groupId>com.corundumstudio.socketio</groupId> <groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId> <artifactId>netty-socketio</artifactId>
<version>1.7.7</version> <version>1.7.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.inject</groupId> <groupId>javax.inject</groupId>
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
<plugin> <plugin>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId> <artifactId>jetty-maven-plugin</artifactId>
<version>9.2.13.v20150730</version> <version>9.2.17.v20160517</version>
<configuration> <configuration>
<scanIntervalSeconds>1</scanIntervalSeconds> <scanIntervalSeconds>1</scanIntervalSeconds>
<webApp> <webApp>
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId> <artifactId>sonar-maven-plugin</artifactId>
<version>2.6</version> <version>3.0.2</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
......
/*
* This file is part of ARSnova Backend.
* Copyright (C) 2012-2015 The ARSnova Team
*
* ARSnova Backend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ARSnova Backend is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thm.arsnova.web;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
/**
* Sets response headers to allow CORS requests.
*/
@Component
public class CorsFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
response.addHeader("Access-Control-Allow-Credentials", "true");
response.addHeader("Access-Control-Allow-Methods", "GET");
response.addHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With");
if (request.getHeader("origin") != null) {
response.addHeader("Access-Control-Allow-Origin", request.getHeader("origin"));
}
filterChain.doFilter(request, response);
}
}
...@@ -61,16 +61,6 @@ ...@@ -61,16 +61,6 @@
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class> <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener> </listener>
<filter>
<filter-name>corsFilter</filter-name>
<filter-class>de.thm.arsnova.web.CorsFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>corsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<mime-mapping> <mime-mapping>
<extension>manifest</extension> <extension>manifest</extension>
<mime-type>text/cache-manifest</mime-type> <mime-type>text/cache-manifest</mime-type>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment