Skip to content

Panic on parsing server config URLs #1770

@link2xt

Description

@link2xt

There are multiple places where parsing server config from URL or just trying to parse a password panics and crashes the whole application using the library.

panic!(
"{} is expecting a {} bytes key, but password: {} ({} bytes after decode)",
method,
enc_key.len(),
password,
v.len()
);

panic!("{method} password {password} is not base64 encoded, error: {err}");

(triggered by ServerConfig::from_url("ss://2022-blake3-aes-128-gcm:[email protected]:9999"))

let upsk = split_iter.next().expect("uPSK");

panic!("iPSK {ipsk} is not base64 encoded, error: {err}");

One of the cases was fixed in #1762

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