moorkop / mccy-engine

Provides a web based "Minecraft Server as a Service" (MCaaS?) to deploy Minecraft server containers on any Docker Swarm cluster or standalone Engine instance.
Apache License 2.0
12 stars 4 forks source link

Expired sessions should return to login page #79

Closed sshipway closed 8 years ago

sshipway commented 8 years ago

When a session expires, it behaves oddly - displaying some containers, not showing modules, etc. Instead, it should redirect back to the top (login) screen.

itzg commented 8 years ago

That used to work correctly, but I haven't paid attention in a while...so I'm glad you pointed this out.

sshipway commented 8 years ago

I am testing via the https://mccy.itzg.me/ test server, so this may be behind revision (0.1-175)

itzg commented 8 years ago

With session timeout turned way down I can re-create it on my local environment. Now I'm trying to figure out why some XHR actions trigger the login redirect and some don't.

For example, clicking "Reload" doesn't behave right, but going to "Manage Mods" does redirect properly.

itzg commented 8 years ago

Oh, I know what it is: it's because some of the API calls, like GET /containers, are now allowed for both authenticated and unauthenticated users so public containers can be obtained. Now I can think of ways to tighten that back up.

itzg commented 8 years ago

Fixed by e5c1ef7ea45ef04789c9371d91208c751a347ef0