Fix share token confusion vulnerability
Cache tokens from /api/send and share tokens were both signed with the same secret and parsed without distinguishing claim types, allowing a public cache token to be replayed as x-umami-share-token to read any website's analytics. Add explicit token type claims (share/cache) and require the matching type when parsing each.
This commit is contained in:
1 parent
c4b1452c29
commit
8bc49a29e3
4 files changed
+27
-7
No files matched your search
@@ -10,6 +10,8 @@ export const LAST_TEAM_CONFIG = 'umami.last-team';
|
||||
export const VERSION_CHECK = 'umami.version-check';
|
||||
export const SHARE_TOKEN_HEADER = 'x-umami-share-token';
|
||||
export const SHARE_CONTEXT_HEADER = 'x-umami-share-context';
|
||||
export const SHARE_TOKEN_TYPE = 'share';
|
||||
export const CACHE_TOKEN_TYPE = 'cache';
|
||||
export const HOMEPAGE_URL = 'https://umami.is';
|
||||
export const DOCS_URL = 'https://umami.is/docs';
|
||||
export const REPO_URL = 'https://github.com/umami-software/umami';
|
||||
|
||||
Reference in new issue
Block a user