codyopel / collide

Automatically exported from code.google.com/p/collide
Apache License 2.0
0 stars 0 forks source link

Bug in Cookies.java #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download last server version
2. Run 'Collide.bat'
3. Open http://localhost:8080 in Chrome 20

What is the expected output? What do you see instead?
Chrome show me a 'Fail on load page' after a lot of time.

What version of the product are you using? On what operating system?
Version: last binary 
(http://code.google.com/p/collide/downloads/detail?name=collide-dist-2012-07-07.
tar.bz2&can=2&q=)
OS: Windows 7, 64 bits

Please provide any additional information below.
Console output

Started
[New I/O  worker #8] 18:04:25,663 SEVERE [deployment-355c066f-b132-4737-8e08-4ec
11d51108f-2]  Exception in Java verticle script
java.lang.ArrayIndexOutOfBoundsException: 1
        at com.google.collide.server.fe.Cookie.extractCookies(Cookie.java:42)
        at com.google.collide.server.fe.Cookie.getCookie(Cookie.java:52)
        at com.google.collide.server.fe.WebFE.authAndWriteHostPage(WebFE.java:13
6)
        at com.google.collide.server.fe.WebFE.handle(WebFE.java:110)
        at com.google.collide.server.fe.WebFE.handle(WebFE.java:46)
        at org.vertx.java.core.http.RouteMatcher.route(RouteMatcher.java:349)
        at org.vertx.java.core.http.RouteMatcher.handle(RouteMatcher.java:68)
        at org.vertx.java.core.http.RouteMatcher.handle(RouteMatcher.java:49)
        at org.vertx.java.core.http.impl.ServerConnection.handleRequest(ServerCo
nnection.java:123)
        at org.vertx.java.core.http.impl.ServerConnection.processMessage(ServerC
onnection.java:246)
        at org.vertx.java.core.http.impl.ServerConnection.handleMessage(ServerCo
nnection.java:95)
        at org.vertx.java.core.http.impl.DefaultHttpServer$ServerHandler.message
Received(DefaultHttpServer.java:540)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S
impleChannelUpstreamHandler.java:75)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerC
ontext.sendUpstream(DefaultChannelPipeline.java:792)
        at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(Chu
nkedWriteHandler.java:141)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerC
ontext.sendUpstream(DefaultChannelPipeline.java:792)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:29
6)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMe
ssageReceived(ReplayingDecoder.java:613)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Repl
ayingDecoder.java:597)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived
(ReplayingDecoder.java:450)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S
impleChannelUpstreamHandler.java:75)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:26
8)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:25
5)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:94)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedK
eys(AbstractNioWorker.java:372)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioW
orker.java:246)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:38)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnabl
e.java:102)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProof
Worker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[New I/O  worker #6] 18:08:39,598 SEVERE [deployment-355c066f-b132-4737-8e08-4ec
11d51108f-4]  Exception in Java verticle script
java.lang.ArrayIndexOutOfBoundsException: 1
        at com.google.collide.server.fe.Cookie.extractCookies(Cookie.java:42)
        at com.google.collide.server.fe.Cookie.getCookie(Cookie.java:52)
        at com.google.collide.server.fe.WebFE.authAndWriteHostPage(WebFE.java:13
6)
        at com.google.collide.server.fe.WebFE.handle(WebFE.java:110)
        at com.google.collide.server.fe.WebFE.handle(WebFE.java:46)
        at org.vertx.java.core.http.RouteMatcher.route(RouteMatcher.java:349)
        at org.vertx.java.core.http.RouteMatcher.handle(RouteMatcher.java:68)
        at org.vertx.java.core.http.RouteMatcher.handle(RouteMatcher.java:49)
        at org.vertx.java.core.http.impl.ServerConnection.handleRequest(ServerCo
nnection.java:123)
        at org.vertx.java.core.http.impl.ServerConnection.processMessage(ServerC
onnection.java:246)
        at org.vertx.java.core.http.impl.ServerConnection.handleMessage(ServerCo
nnection.java:95)
        at org.vertx.java.core.http.impl.DefaultHttpServer$ServerHandler.message
Received(DefaultHttpServer.java:540)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S
impleChannelUpstreamHandler.java:75)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerC
ontext.sendUpstream(DefaultChannelPipeline.java:792)
        at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(Chu
nkedWriteHandler.java:141)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerC
ontext.sendUpstream(DefaultChannelPipeline.java:792)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:29
6)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMe
ssageReceived(ReplayingDecoder.java:613)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Repl
ayingDecoder.java:597)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived
(ReplayingDecoder.java:450)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S
impleChannelUpstreamHandler.java:75)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:26
8)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:25
5)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:94)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedK
eys(AbstractNioWorker.java:372)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioW
orker.java:246)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:38)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnabl
e.java:102)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProof
Worker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Original issue reported on code.google.com by andrelim...@gmail.com on 9 Jul 2012 at 9:11

GoogleCodeExporter commented 9 years ago
That looks like a simple fix to Cookies.java; you must have a cookie without an 
'=' in it.

http://code.google.com/p/collide/source/browse/java/com/google/collide/server/fe
/Cookie.java#42

^^ assumes there's a '=' in all cookies.

Original comment by dragonsinth on 11 Jul 2012 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by dragonsinth on 11 Jul 2012 at 4:49

GoogleCodeExporter commented 9 years ago
Simple fix:

http://code.google.com/r/ianwetherbee-collide/source/detail?r=bf8bb624816fb37ec7
d05c6836f9c48a2bd15357

Original comment by ian.wetherbee on 20 Jul 2012 at 11:12

GoogleCodeExporter commented 9 years ago
Jaime, would you mind reviewing please?

Original comment by dragonsinth on 20 Jul 2012 at 11:55

GoogleCodeExporter commented 9 years ago
Lgtm

Original comment by jaime...@gmail.com on 21 Jul 2012 at 12:01

GoogleCodeExporter commented 9 years ago
Okay great.  Please push it too. :). Leave author info intact.

Original comment by dragonsinth on 21 Jul 2012 at 12:03

GoogleCodeExporter commented 9 years ago
This issue was closed by revision bf8bb624816f.

Original comment by ian.wetherbee on 21 Jul 2012 at 3:51