mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-16 17:23:00 -06:00
formatting
This commit is contained in:
parent
4d1acc477c
commit
c7c8edd982
2 changed files with 6 additions and 6 deletions
|
|
@ -125,7 +125,7 @@ func (m *nollamas) Serve(c *gin.Context) {
|
||||||
nonce := query.Get("nollamas_solution")
|
nonce := query.Get("nollamas_solution")
|
||||||
if nonce == "" || len(nonce) > 20 {
|
if nonce == "" || len(nonce) > 20 {
|
||||||
|
|
||||||
// No attempted solution, just
|
// An invalid solution string, just
|
||||||
// present them with new challenge.
|
// present them with new challenge.
|
||||||
m.renderChallenge(c, challenge)
|
m.renderChallenge(c, challenge)
|
||||||
return
|
return
|
||||||
|
|
@ -190,8 +190,8 @@ func (m *nollamas) token(c *gin.Context, hash hash.Hash) string {
|
||||||
_, _ = hash.Write([]byte{m.diff})
|
_, _ = hash.Write([]byte{m.diff})
|
||||||
|
|
||||||
// Also seed the generated input with
|
// Also seed the generated input with
|
||||||
// current time rounded to TTL, so with
|
// current time rounded to TTL, so our
|
||||||
// our single comparison handles expiries.
|
// single comparison handles expiries.
|
||||||
now := time.Now().Round(m.ttl).Unix()
|
now := time.Now().Round(m.ttl).Unix()
|
||||||
_, _ = hash.Write([]byte{
|
_, _ = hash.Write([]byte{
|
||||||
byte(now >> 56),
|
byte(now >> 56),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue