Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

デバッグ用ユーザーを作る #526

Open
rito528 opened this issue Aug 22, 2024 · 0 comments
Open

デバッグ用ユーザーを作る #526

rito528 opened this issue Aug 22, 2024 · 0 comments

Comments

@rito528
Copy link
Member

rito528 commented Aug 22, 2024

let user = if ENV.name == "local" && session_id == "debug_user" {
User {
name: "debug_user".to_string(),
id: uuid!("478911be-3356-46c1-936e-fb14b71bf282"),
role: Administrator,
}

今はこのように環境変数が local だったときにトークンを debug_user にすることで認証をスキップしているが、何らかの脆弱性を突かれて環境変数が変更された場合に認証をスキップされてしまう可能性がある

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

No branches or pull requests

1 participant