objective categorical abstract machine language personal data server

Validate .well-known/atproto-did content

futur.blue e536d974 eb87da05

verified
+5 -1
+5 -1
pegasus/lib/id_resolver.ml
··· 12 12 match status with 13 13 | `OK -> 14 14 let%lwt did = Body.to_string body in 15 - Lwt.return_ok did 15 + if 16 + String.starts_with ~prefix:"did:plc:" did 17 + || String.starts_with ~prefix:"did:web:" did 18 + then Lwt.return_ok did 19 + else Lwt.return_error "invalid did in .well-known/atproto-did" 16 20 | _ -> 17 21 let%lwt () = Body.drain_body body in 18 22 Lwt.return_error "failed to resolve"