Skip to content

Add cache related challenges - #87

Merged
emmanuelgautier merged 1 commit into
mainfrom
cache-vuln-challenges
Sep 13, 2026
Merged

emmanuelgautier merged 1 commit into
mainfrom
cache-vuln-challenges

Conversation

@emmanuelgautier

Copy link
Copy Markdown
Member

No description provided.

c.store[key] = body
c.mu.Unlock()
w.Header().Set("X-Cache", "MISS")
w.Write([]byte(body))

w.Header().Set("Cache-Control", "private, no-store")
w.Header().Set("X-Cache", "BYPASS")
w.Write([]byte(body))
c.store[key] = body
c.mu.Unlock()
w.Header().Set("X-Cache", "MISS")
w.Write([]byte(body))
w.Header().Set("Cache-Control", "private, no-store")
w.Header().Set("X-Cache", "BYPASS")
body := fmt.Sprintf(`{"email": "%s@example.com", "session_token": "%s"}`, strings.TrimPrefix(token, "Bearer "), token)
w.Write([]byte(body))
c.mu.Unlock()

w.Header().Set("X-Cache", "MISS")
w.Write([]byte(body))
c.mu.Unlock()

w.Header().Set("X-Cache", "MISS")
w.Write([]byte(body))
}

w.Header().Set("X-Cache", "MISS")
w.Write([]byte(body))
c.mu.Unlock()

w.Header().Set("X-Cache", "MISS")
w.Write([]byte(body))
@emmanuelgautier
emmanuelgautier merged commit edf7fb0 into main Sep 13, 2026
44 of 45 checks passed
@emmanuelgautier
emmanuelgautier deleted the cache-vuln-challenges branch September 13, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants