Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Remove session-jacking vulnerability #15

@Voltra

Description

@Voltra

Describe the feature

The current session system models very closely the base PHP session which is to say a map of SESSION_ID -> SESSION_DATA. This, as noted in the documentation of the package, is a quite the vulnerability.

One of the ways to counter that is to change the mapping to be (SESSION_ID, USER_IP) -> SESSION_DATA. This allows:

  • To be unable to get session-jacking by stealing the session ID cookie
  • To keep sessions independent by browser sessions when sharing the same IP on the same network

However, this requires two things:

  • Access to the user's IP address (GDPR compliance + I think it's slightly complicated to get in Nuxt 3?)
  • Proper IP forwarding if the app is "hidden" behind a proxy

Moreover this brings out a number of issues:

  • Quid of the user's IP changing (e.g. moving a lot using a mobile network)

This is not a perfect solution, it is right now just a proposition and I think people can add other solutions to expand our horizons. Something akin to Laravel's session driver might be a good thing too.

I'll try and figure out how to get the IP-restricted session system working and make a proper PR, unless someone beats me to it.

Additional information

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions