安全: 多用户环境下令牌回退路径冲突 (cap_portal.rs) #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
位置
src/cap_portal.rs:249-253严重性
🟡 中
问题描述
当
dirs::cache_dir()返回None时,回退到/tmp/wl-webrtc/portal-restore-token。/tmp是全局共享的临时目录,多用户运行时路径相同,导致:另外,
/tmp中的文件在系统重启后会被清理,使令牌无法持久化,违背了PersistMode::ExplicitlyRevoked的设计意图。建议修复
回退路径应包含 UID 以保证用户隔离: