Skip to main content

parse_send_url

Function parse_send_url 

Source
fn parse_send_url(url: &Url) -> Result<(String, String)>
Expand description

Extract (send_id, url_b64_key) from the last two #-fragment segments.

Mirrors the legacy CLI’s getIdAndKey (url.hash.slice(1).split("/").slice(-2)), which is why one parser handles both link shapes: the web-vault route (https://vault.example.com/#/send/<id>/<key>) and the cloud Send vanity host (https://send.bitwarden.com/#<id>/<key>) — only the trailing two segments matter.