8000 Seven hand-written cookie parsers and six Set-Cookie formatters · Issue #303 · alexbeeken/skrongle-mini · GitHub
[go: up one dir, main page]

Skip to content

Seven hand-written cookie parsers and six Set-Cookie formatters #303

Backlog

Description

@alexbeeken

Duplicated code on a security boundary.

  • Parsers: src/auth.rs:463, src/i18n.rs:230, src/proxy_auth.rs:289, src/routes/auth.rs:534 and :600, src/routes/sprint.rs:99, src/routes/oauth.rs:234.
  • Formatters, each with its own attribute string: src/auth.rs:482 and :490, src/i18n.rs:265, src/routes/auth.rs:524 and :589, src/routes/oauth.rs:198.

Fix, one PR: a cookies module with get(headers, name) and set(name, value, max_age, http_only, secure). The __Host- prefix from the hardening list then becomes a one-line change. tz_offset_secs (src/routes/sprint.rs) belongs here too.

From the code review of 24 November 2026. Line numbers are as of 0.5.0 (2547b36).

Activity

  1. added
    review
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0