Details
Details
Tried to upload blob with hash blob/hash$@ - a HTTP 400 error was returned.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
services/blob/src/http/handlers/blob.rs | ||
---|---|---|
263–266 | to make this a bit cleaner, you could add a validate_identifier method, which returns an Result<()>, and reduce this boilerplate. This is just my personal preference, not a blocker. pub fn validate_identifier(holder) -> Result<()> { if !is_valid_identifier(&holder) { warn!(holder, "Holder is not a valid identifier"); return Err(ErrorBadRequest("Bad request")); } Ok(()) } |
services/blob/src/http/handlers/blob.rs | ||
---|---|---|
263–266 | Didn't delete the old snippet of code, oops |
services/blob/src/http/handlers/blob.rs | ||
---|---|---|
263–266 | Makes sense, but it's either "holder" or "blob hash" so I'd have to make this configurable. Eventually, I can write a macro In the long term, I'm planning to use some validator at the actix_web level so this won't have to be done manually in every handler |