Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 180f2891bb
Merge 081b84a5e3 into 8e79294413 2023-10-18 10:46:30 +07:00
5 changed files with 15 additions and 18 deletions

View File

@ -1,7 +1,5 @@
name: CI name: CI
on: on: [push]
- pull_request
- push
jobs: jobs:
build: build:
@ -9,17 +7,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
goVer: [1.21, 1.22, 1.23] goVer: [1.16, 1.17, 1.18]
steps: steps:
- name: Set up Go ${{ matrix.goVer }} - name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v5 uses: actions/setup-go@v1
with: with:
go-version: ${{ matrix.goVer }} go-version: ${{ matrix.goVer }}
id: go id: go
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Get dependencies - name: Get dependencies
run: | run: |
@ -33,4 +31,4 @@ jobs:
run: diff -u <(echo -n) <(gofmt -d .) run: diff -u <(echo -n) <(gofmt -d .)
- name: Test - name: Test
run: go test ./... run: go test -v ./...

View File

@ -38,7 +38,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.22 go-version: 1.14
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y gcc-multilib run: sudo apt-get update && sudo apt-get install -y gcc-multilib
- if: matrix.arch == '386' - if: matrix.arch == '386'
@ -47,7 +47,7 @@ jobs:
run: echo "RELEASE=gophish-${{ github.event.release.tag_name }}-${{ matrix.releaseos }}-64bit" >> $GITHUB_ENV run: echo "RELEASE=gophish-${{ github.event.release.tag_name }}-${{ matrix.releaseos }}-64bit" >> $GITHUB_ENV
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
run: echo "RELEASE=gophish-${{ github.event.release.tag_name }}-${{ matrix.releaseos }}-64bit" | Out-File -FilePath $env:GITHUB_ENV -Append # https://github.com/actions/runner/issues/1636 run: echo "RELEASE=gophish-${{ github.event.release.tag_name }}-${{ matrix.releaseos }}-64bit" | Out-File -FilePath $env:GITHUB_ENV -Append # https://github.com/actions/runner/issues/1636
- uses: actions/checkout@v4 - uses: actions/checkout@v2
- name: Build ${{ matrix.goos }}/${{ matrix.arch }} - name: Build ${{ matrix.goos }}/${{ matrix.arch }}
run: go build -o ${{ matrix.bin }} run: go build -o ${{ matrix.bin }}
env: env:
@ -55,7 +55,7 @@ jobs:
GOARCH: ${{ matrix.arch }} GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 1 CGO_ENABLED: 1
- name: Upload to artifacts - name: Upload to artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v2
with: with:
name: ${{ env.RELEASE }} name: ${{ env.RELEASE }}
path: ${{ matrix.bin }} path: ${{ matrix.bin }}
@ -65,8 +65,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v2
with: with:
path: bin path: bin
- name: Package Releases - name: Package Releases
@ -96,7 +96,7 @@ jobs:
done done
done done
- name: Upload to artifacts - name: Upload to artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v2
with: with:
name: releases name: releases
path: releases/*.zip path: releases/*.zip
@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: package needs: package
steps: steps:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v2
with: with:
name: releases name: releases
path: releases/ path: releases/

View File

@ -109,7 +109,6 @@ func (as *Server) Users(w http.ResponseWriter, r *http.Request) {
Role: role, Role: role,
RoleID: role.ID, RoleID: role.ID,
PasswordChangeRequired: ur.PasswordChangeRequired, PasswordChangeRequired: ur.PasswordChangeRequired,
AccountLocked: ur.AccountLocked,
} }
err = models.PutUser(&user) err = models.PutUser(&user)
if err != nil { if err != nil {

View File

@ -115,8 +115,8 @@ func (im *Monitor) Shutdown() error {
return nil return nil
} }
// checkForNewEmails logs into an IMAP account and checks unread emails for the // checkForNewEmails logs into an IMAP account and checks unread emails
// rid campaign identifier. // for the rid campaign identifier.
func checkForNewEmails(im models.IMAP) { func checkForNewEmails(im models.IMAP) {
im.Host = im.Host + ":" + strconv.Itoa(int(im.Port)) // Append port im.Host = im.Host + ":" + strconv.Itoa(int(im.Port)) // Append port
mailServer := Mailbox{ mailServer := Mailbox{