Skip to content

martian: remove session hijacking #497

@mmatczuk

Description

@mmatczuk

Martian Session can be hijacked, hijacking means getting and owning the underlying connection.

func (s *Session) Hijack() (conn net.Conn, brw *bufio.ReadWriter, err error) {

This feature is generally not used. We use it in proxy to implement abortIf. This implementation is problematic because every time client does something "bad" we terminate the connection. In some cases it makes sense ex. wrong basic auth credentials but in other cases it makes more harm than good.

If we removed hijacking

  • the proxy code could be streamlined because we would not have to check if session was hijacked every time we ran modifiers
  • abortIf could be removed, we would have normal modifiers error handling needs to be fixed in forwarder to return appropriate response for error

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions