View Issue Details

IDProjectCategoryView StatusLast Update
0020472mantisbtinstallationpublic2016-06-12 00:42
ReporterdregadAssigned 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 11:30:22

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
mod - admin/schema.php Diff File

MantisBT: master 1f678c2a

2016-06-10 18:26:56

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
mod - api_tokens_page.php Diff File
mod - core/api_token_api.php Diff File

MantisBT: master 4be5f228

2016-06-11 11:56:14

dregad

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

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

Fixes 0020472
mod - admin/schema.php Diff File

MantisBT: master aee85747

2016-06-11 14:31:34

dregad

Details Diff
Negate test in api_token_is_used()

Fix error in 1f678c2afce4275fc396f3757a0db20d8f1b89fa

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

Issue History

Date Modified Username Field Change
2016-01-02 18:12 dregad New Issue
2016-01-02 18:12 dregad Status new => assigned
2016-01-02 18:12 dregad Assigned To => dregad
2016-01-02 18:12 dregad Issue generated from: 0020443
2016-01-02 18:12 dregad Relationship added related to 0020443
2016-01-02 18:12 dregad Relationship added related to 0017766
2016-01-02 18:26 dregad Note Added: 0052238
2016-01-16 18:32 dregad Target Version => 1.3.0-rc.2
2016-06-04 19:23 vboctor Note Added: 0053264
2016-06-11 12:09 dregad Changeset attached => MantisBT master 17c05b5d
2016-06-11 12:09 dregad Changeset attached => MantisBT master 1f678c2a
2016-06-11 12:09 dregad Changeset attached => MantisBT master 4be5f228
2016-06-11 12:09 dregad Status assigned => resolved
2016-06-11 12:09 dregad Resolution open => fixed
2016-06-11 12:09 dregad Fixed in Version => 1.3.0-rc.2
2016-06-11 14:32 dregad Changeset attached => MantisBT master aee85747
2016-06-12 00:42 vboctor Status resolved => closed