Skip to content

Bug: Silent failures when creating token storage directory #493

@mango766

Description

@mango766

I noticed in src/token_storage.rs that failures to create the token directory or set its permissions are silently ignored using let _.\n\nrust\nlet _ = tokio::fs::create_dir_all(parent).await;\n// ...\nlet _ = std::fs::set_permissions(parent, std::fs::Permissions::from_mode(0o700));\n\n\nIf directory creation fails (e.g. due to permissions), the subsequent file write will likely fail with a confusing error, or if permission setting fails, the token file might be left with insecure permissions.\n\nThese errors should probably be propagated up to the caller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions