Monorepo for Tangled tangled.org

appview: don't trust oauth.ClientSessionData #1188

open opened by boltless.me targeting master from sl/uvpzuszrulvq

oauth.ClientSessionData.HostURL is not validated after first session creation. If user switches the PDS while logged in, .HostURL will still point to old PDS, showing account management options for tngl.sh users. This can confuse users to accidentally put account in odd state (activated in both PDSes)

Instead, always resolve Handles and PDS hosts on-demand. Technically HostURL is used on creating authorized atpclient, but that's ok because request to old PDS will reject the request.

Ideally we should revoke user sessions on #account event, indigo currently doesn't support DID based revoking.

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mhivzoc7en22
Interdiff #1 #2
appview/ingester.go

This file has not been changed.

appview/oauth/accounts.go

This file has not been changed.

appview/oauth/accounts_test.go

This file has not been changed.

appview/oauth/oauth.go

This file has not been changed.

appview/pages/funcmap.go

This file has not been changed.

appview/pages/templates/user/settings/profile.html

This file has not been changed.

appview/settings/danger.go

This file has not been changed.

appview/settings/settings.go

This file has not been changed.

appview/state/router.go

This file has not been changed.

History

3 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview: don't trust oauth.ClientSessionData
1/3 failed, 2/3 success
expand
no conflicts, ready to merge
expand 0 comments
1 commit
expand
appview: don't trust oauth.ClientSessionData
1/3 failed, 2/3 success
expand
expand 0 comments
1 commit
expand
appview: don't trust oauth.ClientSessionData
expand 0 comments