mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
## 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.
11 lines
328 B
Rust
11 lines
328 B
Rust
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"
|
|
));
|
|
}
|