mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-05-12 18:48:22 +00:00
Compare commits
4 commits
79ccd2ecec
...
390b7be866
Author | SHA1 | Date | |
---|---|---|---|
390b7be866 | |||
aaf7213315 | |||
1bbe7dc952 | |||
1499a80625 |
2 changed files with 5 additions and 4 deletions
6
.github/workflows/.go.yml
vendored
6
.github/workflows/.go.yml
vendored
|
@ -18,12 +18,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/passbolt/passbolt_docker.git ../passbolt_docker
|
git clone https://github.com/passbolt/passbolt_docker.git ../passbolt_docker
|
||||||
cd ../passbolt_docker
|
cd ../passbolt_docker
|
||||||
docker-compose -f docker-compose/docker-compose-ce.yaml up -d
|
docker compose -f docker-compose/docker-compose-ce.yaml up -d
|
||||||
docker ps -a
|
docker ps -a
|
||||||
- name: "Test"
|
- name: "Test"
|
||||||
run: |
|
run: |
|
||||||
docker exec docker-compose_passbolt_1 sh -c '/usr/bin/wait-for.sh -t 30 localhost:443'
|
docker exec docker-compose-passbolt-1 sh -c '/usr/bin/wait-for.sh -t 30 localhost:443'
|
||||||
output=$(docker exec docker-compose_passbolt_1 sh -c 'su -m -c "/usr/share/php/passbolt/bin/cake \
|
output=$(docker exec docker-compose-passbolt-1 sh -c 'su -m -c "/usr/share/php/passbolt/bin/cake \
|
||||||
passbolt register_user \
|
passbolt register_user \
|
||||||
-u your@email.com \
|
-u your@email.com \
|
||||||
-f yourname \
|
-f yourname \
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// APIResponse is the Struct representation of a Json Response
|
// APIResponse is the Struct representation of a Json Response
|
||||||
|
@ -62,7 +63,7 @@ start:
|
||||||
if res.Header.Status == "success" {
|
if res.Header.Status == "success" {
|
||||||
return r, &res, nil
|
return r, &res, nil
|
||||||
} else if res.Header.Status == "error" {
|
} else if res.Header.Status == "error" {
|
||||||
if res.Header.Code == 403 && res.Header.URL == "/mfa/verify/error.json" {
|
if res.Header.Code == 403 && strings.HasSuffix(res.Header.URL, "/mfa/verify/error.json") {
|
||||||
if !firstTime {
|
if !firstTime {
|
||||||
// if we are here this probably means that the MFA callback is broken, to prevent a infinite loop lets error here
|
// if we are here this probably means that the MFA callback is broken, to prevent a infinite loop lets error here
|
||||||
return r, &res, fmt.Errorf("Got MFA challenge twice in a row, is your MFA Callback broken? Bailing to prevent loop...:")
|
return r, &res, fmt.Errorf("Got MFA challenge twice in a row, is your MFA Callback broken? Bailing to prevent loop...:")
|
||||||
|
|
Loading…
Add table
Reference in a new issue