View Issue Details

IDProjectCategoryView StatusLast Update
0020472mantisbtinstallationpublic2016-06-12 00:42
Reporterdregad Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.3.0-rc.1 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020472: New 'api_token' table columns are not defined in standard way
Description

Following @grangeway's comment in PR 685 [1]:

  • user_id field should be unsigned int
  • default value for varchar columns should be ''
  • default value for date fields should be 1 not 0

[1] https://github.com/mantisbt/mantisbt/pull/685#discussion_r48686670

Additional Information

Severity set to major because we should not release 1.3.0 with an inconsistent schema.

TagsNo tags attached.

Relationships

related to 0020443 closeddregad New 'api_token' table does not have standard options 
related to 0017766 closedvboctor Access Tokens instead of Passwords 

Activities

dregad

dregad

2016-01-02 18:26

developer   ~0052238

PR https://github.com/mantisbt/mantisbt/pull/700

vboctor

vboctor

2016-06-04 19:23

manager   ~0053264

In my opinion, we should only fix:
user_id field should be unsigned int

Related Changesets

MantisBT: master 17c05b5d

2016-01-02 06:30

dregad


Details Diff
Fixing api_token table structure

After careful review following @grangeway's comment in PR 685 [1]:

- user_id field should be *unsigned* int
- default value for varchar columns should be ''
- default value for date fields should be 1 not 0

[1] https://github.com/mantisbt/mantisbt/pull/685#discussion_r48686670

Fixes 0020472
Affected Issues
0020472
mod - admin/schema.php Diff File

MantisBT: master 1f678c2a

2016-06-10 14:26

dregad


Details Diff
New api_token_is_used() function

Move the logic to determine whether a token has been used from
api_tokens_page.php to the api_tokens API where it belongs.

The check against date_used has been changed from '=== 0' to '<= 1' to
reflect the change in schema definition in step 206.

Fixes 0020472
Affected Issues
0020472
mod - api_tokens_page.php Diff File
mod - core/api_token_api.php Diff File

MantisBT: master 4be5f228

2016-06-11 07:56

dregad


Details Diff
Revert 'name' and 'hash' columns to original definition

Following discussion in PR https://github.com/mantisbt/mantisbt/pull/700

Fixes 0020472
Affected Issues
0020472
mod - admin/schema.php Diff File

MantisBT: master aee85747

2016-06-11 10:31

dregad


Details Diff
Negate test in api_token_is_used()

Fix error in 1f678c2afce4275fc396f3757a0db20d8f1b89fa

Fixes 0020472
Affected Issues
0020472
mod - api_tokens_page.php Diff File
mod - core/api_token_api.php Diff File