Page MenuHomePhabricator

ConduitEpochParameterType validation fix to accept string values
AbandonedPublic

Authored by gd on Oct 12 2016, 11:37 AM.
Tags
None
Referenced Files
F13508727: D16693.id40186.diff
Wed, Jul 24, 2:44 AM
Unknown Object (File)
Tue, Jul 23, 4:59 AM
Unknown Object (File)
Sat, Jul 13, 7:34 AM
Unknown Object (File)
Wed, Jul 10, 1:54 AM
Unknown Object (File)
Thu, Jun 27, 1:08 PM
Unknown Object (File)
Tue, Jun 25, 12:27 PM
Unknown Object (File)
Jun 21 2024, 9:06 AM
Unknown Object (File)
Jun 17 2024, 4:21 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

Allow epoch timestamp parameter to be used from calls where values are strings (e.g. curl).

Test Plan

Execute

$ curl http://$PHABRICATOR_HOST/api/maniphest.search -d api.token=$CONDUIT_TOKEN -d constraints[modifiedEnd]=$(date +%s) -d limit=1

Do not get error Error while reading "modifiedEnd": Expected epoch timestamp as integer, got something else..

Execute

$ curl http://$PHABRICATOR_HOST/api/maniphest.search -d api.token=$CONDUIT_TOKEN -d constraints[modifiedEnd]=99999999999999999999999 -d limit=1

Get error Error while reading "modifiedEnd": Epoch timestamp integer overflow.

Diff Detail

Repository
rP Phabricator
Branch
conduit-timestamp-validation-fix
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14079
Build 18266: arc lint + arc unit

Event Timeline

gd retitled this revision from to ConduitEpochParameterType validation fix to accept string values.
gd updated this object.
gd edited the test plan for this revision. (Show Details)
gd added a reviewer: epriestley.

Turns out this is a more general problem. I'm abandoning this in favour of D16694 attempt to fix this in a more general way.