Page MenuHomePhabricator

API should return error message when sha1/sha1base36 is invalid
Closed, ResolvedPublic

Description

Using a invalid sha1 value for list=allimages/list=filearchive returns all files.

Using a invalid sha1base36 returns nothing.

In my opinion a error message is good, or let a invalid sha1 return nothing.

Thanks.


Version: 1.18.x
Severity: enhancement

Details

Reference
bz27593

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:26 PM
bzimport set Reference to bz27593.

"Invalid" can only be defined by it not being the correct length, right?

Bryan.TongMinh wrote:

Well, they should contain only 0-f or 0-z respectively.

0-f and 0-z

Surely it's 0123456789abcdef?

I suppose a length check, and then check for a char that doesn't match those...

Right, so sha1 are hex, but base36 is 0-9a-z like you say

filearchive doesn't allow you to specify a SHA1 hash to filter by.. Just output

r88174

(In reply to comment #4)

filearchive doesn't allow you to specify a SHA1 hash to filter by.. Just output

Because bug 21346 was reverted after written of this bug