mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Clarify device-code phishing warning (#31648)
## Why The existing device-code warning does not help users distinguish a login they initiated from a phishing attempt. The warning should tell users to stop when the code came from a website or another person. ## What changed - Updated the warning in the direct CLI and TUI device-code login flows with actionable guidance. - Added focused coverage for the styled direct CLI prompt.
This commit is contained in:
1 parent
c55cb4b363
commit
f3bfaca3c1
3 files changed
+24
-5
No files matched your search
@@ -0,0 +1,10 @@
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn device_code_prompt_renders_phishing_warning() {
|
||||
let prompt = device_code_prompt("https://example.com/device", "ABCD-EFGH");
|
||||
|
||||
assert!(prompt.contains(
|
||||
"\x1b[90mContinue only if you started this login in Codex. If a website or another person gave you this code, cancel.\x1b[0m"
|
||||
));
|
||||
}
|
||||
Reference in new issue
Block a user