You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the API to create a user token (POST /user/tokens) I was met with an HTTP 500.
The panic included (part of trace removed for brevity):
Error 1406: Data too long for column 'id' at row 1
/usr/local/Cellar/go/1.8/libexec/src/runtime/panic.go:489 (0x42875f)
...
/Users/m/p/go/src/github.com/ansible-semaphore/semaphore/api/user.go:50 (0x910ad4)
...
The code that creates the API token takes a 32 byte[] and base64 encodes it:
When calling the API to create a user token (POST /user/tokens) I was met with an HTTP 500.
The panic included (part of trace removed for brevity):
The code that creates the API token takes a 32 byte[] and base64 encodes it:
A 32 byte[] in base64 will yield a string of 44 characters:
4 * math.Ceil(32/3.0) = 44
(@see http://stackoverflow.com/questions/13378815/base64-length-calculation)The
user__token
mysql table has anid
field of 32 characters, this should be 44, so a migration of:This worked for me - not sure if its already been picked up, but I couldn't find it in issues.
The text was updated successfully, but these errors were encountered: