9 Commits (4f27c289472a4cfafb5a9b0e38e6a3413c30c562)

Author SHA1 Message Date
wxiaoguang 49dd906753
Use base32 for 2FA scratch token (#18384)
* Use base32 for 2FA scratch token
* rename Secure* to Crypto*, add comments
2 years ago
silverwind 1e6fa57acb
Use single shared random string generation function (#15741)
* Use single shared random string generation function

- Replace 3 functions that do the same with 1 shared one
- Use crypto/rand over math/rand for a stronger RNG
- Output only alphanumerical for URL compatibilty

Fixes: #15536

* use const string method

* Update modules/avatar/avatar.go

Co-authored-by: a1012112796 <1012112796@qq.com>

Co-authored-by: a1012112796 <1012112796@qq.com>
3 years ago
Lunny Xiao d151503d34 Upgrade xorm to v0.8.0 (#8536) 5 years ago
Lunny Xiao 85202d4784
Display ui time with customize time location (#7792)
* display ui time with customize time location

* fix lint

* rename UILocation to DefaultUILocation

* move time related functions to modules/timeutil

* fix tests

* fix tests

* fix build

* fix swagger
5 years ago
zeripath 026696b87a
Fix dropTableColumns sqlite implementation (#7710)
* Fix dropTableColumns sqlite implementation

* use droptables and its index dropping support in v78 and v85

* golang-ci fixes

* Add migration from gitea 1.3.3 for sqlite which reveals the droptables bug - thus showing this works
5 years ago
Lunny Xiao aa7c34cf86 Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug

* upgrade packages

* fix fmt

* fix Consistency

* fix tests
5 years ago
kolaente f9ec2f89f2 Add golangci (#6418) 5 years ago
zeripath 07bcccf9ce
Fix v85.go: Set UNIQUE constraint later (#6851)
Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
techknowlogick 46373e7657
Hash App token (#6724) 5 years ago