Skip to content

Commit

Permalink
feat: update and solve totp number zero padd
Browse files Browse the repository at this point in the history
  • Loading branch information
mhf-ir committed Jan 18, 2023
1 parent 0613126 commit 0c0b299
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 342 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-bullseye AS static
FROM node:18-bullseye AS static

ADD . /src

Expand All @@ -11,7 +11,7 @@ RUN cd /src/web \
&& echo "front build ended" \
&& rm -rf .gitignore

FROM golang:1.17-buster AS builder
FROM golang:1.19-buster AS builder

ADD . /src

Expand Down
71 changes: 0 additions & 71 deletions aclstorage.go

This file was deleted.

24 changes: 0 additions & 24 deletions aclstorage_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions challenge.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"time"

Expand Down Expand Up @@ -119,7 +119,7 @@ func (ch *challenge) setCaptchaValue(restCaptchaURL string, difficultyLevel stri
}
defer resp.Body.Close()

body, _ := ioutil.ReadAll(resp.Body)
body, _ := io.ReadAll(resp.Body)
var captchaRes captchaResponse
err2 := json.Unmarshal(body, &captchaRes)
if err2 != nil {
Expand Down
57 changes: 0 additions & 57 deletions challengestorage.go

This file was deleted.

24 changes: 0 additions & 24 deletions challengestorage_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ services:
container_name: protection-rest-captcha-test
image: ghcr.io/aasaam/rest-captcha:latest
network_mode: host
command: -test-image -return-value
command: run -test-image -return-value
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module github.com/aasaam/nginx-protection

go 1.17
go 1.19

require (
github.com/aasaam/aes-go v0.0.4
github.com/go-ldap/ldap/v3 v3.4.4
github.com/gofiber/adaptor/v2 v2.1.30
github.com/gofiber/fiber/v2 v2.40.1
github.com/gofiber/helmet/v2 v2.2.22
github.com/gofiber/template v1.7.3
github.com/gofiber/adaptor/v2 v2.1.31
github.com/gofiber/fiber/v2 v2.41.0
github.com/gofiber/helmet/v2 v2.2.23
github.com/gofiber/template v1.7.4
github.com/mdp/qrterminal v1.0.1
github.com/pquerna/otp v1.4.0
github.com/prometheus/client_golang v1.14.0
github.com/rs/zerolog v1.28.0
github.com/urfave/cli/v2 v2.23.7
golang.org/x/text v0.5.0
golang.org/x/text v0.6.0
gopkg.in/yaml.v2 v2.4.0
)

Expand All @@ -29,7 +29,7 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
Expand All @@ -38,7 +38,7 @@ require (
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.41.0 // indirect
github.com/valyala/fasthttp v1.44.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
Expand Down
Loading

0 comments on commit 0c0b299

Please sign in to comment.