1. 19 2月, 2015 2 次提交
    • S
      Change SockJS and Websocket default allowedOrigins to same origin · 23fa37b0
      Sebastien Deleuze 提交于
      This commit adds support for a same origin check that compares
      Origin header to Host header. It also changes the default setting
      from all origins allowed to only same origin allowed.
      
      Issues: SPR-12697, SPR-12685
      (cherry picked from commit 6062e155)
      23fa37b0
    • S
      Fix SockJS origin check · cc78d40c
      Sebastien Deleuze 提交于
      This commit introduces the following changes:
       - Requests without Origin header are not rejected anymore
       - Disable Iframe when allowedOrigins is not empty and not equals to *
       - The Iframe is not cached anymore in order to have a reliable origin check
       - allowedOrigins must not be null or empty
       - allowedOrigins format is now validated (should be * or start by http(s)://)
      
      Issue: SPR-12660
      (cherry picked from commit 9b3319b3)
      cc78d40c
  2. 30 12月, 2014 1 次提交
  3. 08 12月, 2014 1 次提交
  4. 03 12月, 2014 1 次提交
  5. 03 11月, 2014 1 次提交
    • B
      Fix SubProtocolHandler duplicate registration · 1fff631d
      Brian Clozel 提交于
      Prior to this change, duplicate SubProtocolHandlers could be registered
      when configuring STOMP with several registrations:
      
          public void registerStompEndpoints
                (final StompEndpointRegistry registry) {
            this.endpointRegistry.addEndpoint("/stompOverWebSocket");
            this.endpointRegistry.addEndpoint("/stompOverSockJS").withSockJS();
          }
      
      This commit registers sub-protocols in a Set instead of a list (see
      SubProtocolWebSocketHandler), thus fixing the issue.
      
      Issue: SPR-12403
      1fff631d
  6. 01 11月, 2014 1 次提交
  7. 30 10月, 2014 1 次提交
  8. 29 10月, 2014 2 次提交
  9. 27 10月, 2014 3 次提交
    • R
      Replace "if(" with "if (" · da612d07
      Rossen Stoyanchev 提交于
      da612d07
    • S
      Add an option to disable automatic addition of CORS header · 58f4014b
      Sebastien Deleuze 提交于
      Issues: SPR-12283
      58f4014b
    • S
      Add an option to set an Origin whitelist for Websocket and SockJS · 743356fa
      Sebastien Deleuze 提交于
      This commit introduces a new OriginHandshakeInterceptor. It filters
      Origin header value against a list of allowed origins.
      
      AbstractSockJsService as been modified to:
       - Reject CORS requests with forbidden origins
       - Disable transport types that does not support CORS when an origin
         check is required
       - Use the Origin request header value instead of "*" for
         Access-Control-Allow-Origin response header value
         (mandatory when  Access-Control-Allow-Credentials=true)
       - Return CORS header only if the request contains an Origin header
      
      It is possible to configure easily this behavior thanks to JavaConfig API
      WebSocketHandlerRegistration#addAllowedOrigins(String...) and
      StompWebSocketEndpointRegistration#addAllowedOrigins(String...).
      It is also possible to configure it using the websocket XML namespace.
      
      Please notice that this commit does not change the default behavior:
      cross origin requests are still enabled by default.
      
      Issues: SPR-12226
      743356fa
  10. 24 10月, 2014 1 次提交
    • R
      Add ImmutableMessageChannelInterceptor · 687955a7
      Rossen Stoyanchev 提交于
      This change adds a ChannelInterceptor that flips the immutable flag on
      messages being sent. This allows components sending messages to leave
      the message mutable for interceptors to further apply modifications
      before the message is sent (and exposed to concurrency).
      
      The interceptor is automatically added with the STOMP/WebSocket Java
      and XML config and the StompSubProtocolHandler leaves parsed incoming
      messages mutable so they can be further modified before being sent.
      
      Issue: SPR-12321
      687955a7
  11. 21 10月, 2014 1 次提交
  12. 20 10月, 2014 1 次提交
  13. 14 10月, 2014 2 次提交
  14. 13 10月, 2014 1 次提交
  15. 11 10月, 2014 1 次提交
  16. 08 10月, 2014 2 次提交
  17. 07 10月, 2014 1 次提交
  18. 27 9月, 2014 2 次提交
  19. 26 9月, 2014 1 次提交
    • R
      Detect unsent DISCONNECT messages · 371d93b3
      Rossen Stoyanchev 提交于
      This change uses a ChannelInterceptor (inserted at index 0) to detect
      when a DISCONNECT message is precluded from being sent on the
      clientInboundChannel. This can happen if another interceptor allows
      a runtime exception out from preSend or returns false.
      
      It is crucial for such messages to be processed, so when detected
      they're processed still.
      
      Issue: SPR-12218
      371d93b3
  20. 20 9月, 2014 1 次提交
  21. 19 9月, 2014 1 次提交
  22. 04 9月, 2014 1 次提交
  23. 26 8月, 2014 1 次提交
  24. 22 8月, 2014 1 次提交
  25. 12 8月, 2014 1 次提交
  26. 04 8月, 2014 1 次提交
  27. 31 7月, 2014 2 次提交
  28. 30 7月, 2014 1 次提交
  29. 24 7月, 2014 1 次提交
    • R
      Filter WebSocket extensions · e74ac067
      Rossen Stoyanchev 提交于
      Before this change the DefaultHandshakeHandler by default passed the
      list of requested WebSocket extensions as-is relying on the WebSocket
      engine to remove those not supported.
      
      This change ensures that WebSocket extensions not supported by the
      runtime are proactively removed instead.
      
      This change is preparation for SPR-11094.
      e74ac067
  30. 23 7月, 2014 1 次提交
  31. 18 7月, 2014 1 次提交
  32. 16 7月, 2014 1 次提交