Compare commits

...

4 commits

Author SHA1 Message Date
390b7be866 Fix MFA detection with custom APP_BASE 2024-08-13 11:25:34 +02:00
aaf7213315
Merge pull request #21 from passbolt/fix-ci-docker
Fix ci docker compose command
2024-08-13 11:18:37 +02:00
1bbe7dc952 Update Docker Container Name 2024-08-13 11:16:30 +02:00
1499a80625 Update docker compose command 2024-08-13 11:11:42 +02:00
2 changed files with 5 additions and 4 deletions

View file

@ -18,12 +18,12 @@ jobs:
run: |
git clone https://github.com/passbolt/passbolt_docker.git ../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
- name: "Test"
run: |
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 \
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 \
passbolt register_user \
-u your@email.com \
-f yourname \

View file

@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"strings"
)
// APIResponse is the Struct representation of a Json Response
@ -62,7 +63,7 @@ start:
if res.Header.Status == "success" {
return r, &res, nil
} 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 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...:")