Skip to content

Bug: Invalid expire param when creating API Key or File Token #2604

@stnguyen90

Description

@stnguyen90

Summary

When attempting to create an API key or a File token, the following error is returned:

Invalid expire param: Value must be valid date in the future and between 0000-01-01 00:00:00 and 9999-12-31 00:00:00. or null

Steps to Reproduce

  1. Go to the section to create an API key or File token in the console
  2. Set the expire parameter to Never
  3. Attempt to create the API key or File token
  4. Observe the error message above

Expected Behavior

API key or File token should be created successfully when the provided expire param is a valid future date or is left as null.

Actual Behavior

Creation fails with an error about the expire param being invalid.

Additional Information

  • The error occurs for both API key and File token creation
  • Possibly related to input validation logic for the expire field

Suggested Next Steps

  • Review and fix validation logic for the expire parameter to ensure valid dates and null are accepted
  • Add additional safeguards or tests for edge cases involving the date range

If more tracing or logs are needed, let me know and I'll help gather them.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingproduct / storageFixes and upgrades for the Appwrite Storage

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions