5 Commits

Author SHA1 Message Date
16bcbd731c fix: explicitly load Cloudflare Turnstile
Some checks reported errors
Tests / Backend - Tests skipped: 8, passed: 74
Backend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 78.66% (553/703) * Lines of Code: 703 #### Quality Gates Summary No active quality gates.
Tests / Frontend - Lint, Tests et Build passed: 83
Frontend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 80.85% (553/684) * Lines of Code: 684 #### Quality Gates Summary No active quality gates.
THE-TIP-TOP-MULTIBRANCH/pipeline/head Something is wrong with the build of this commit
2026-09-20 00:37:37 +00:00
246303139d release: 1.0.9
All checks were successful
Tests / Backend - Tests skipped: 8, passed: 74
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
Backend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 78.38% (551/703) * Lines of Code: 703 #### Quality Gates Summary No active quality gates.
Tests / Frontend - Lint, Tests et Build passed: 83
Frontend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 84.94% (547/644) * Lines of Code: 644 #### Quality Gates Summary No active quality gates.
2026-09-19 23:29:13 +00:00
1e09420705 release: 1.0.7
All checks were successful
Tests / Backend - Tests skipped: 8, passed: 74
Backend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 78.38% (551/703) * Lines of Code: 703 #### Quality Gates Summary No active quality gates.
Tests / Frontend - Lint, Tests et Build passed: 83
Frontend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 84.94% (547/644) * Lines of Code: 644 #### Quality Gates Summary No active quality gates.
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
2026-09-18 02:43:53 +00:00
cc495f3b87 release: promote 1.0.5 to production
All checks were successful
Tests / Backend - Tests skipped: 7, passed: 27
Backend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 60.55% (333/550) * Lines of Code: 550 #### Quality Gates Summary No active quality gates.
Tests / Frontend - Lint, Tests et Build passed: 45
Frontend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 86.14% (230/267) * Lines of Code: 267 #### Quality Gates Summary No active quality gates.
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
2026-08-28 09:10:03 +00:00
570f5d44f5 security: remove hardcoded admin credentials
All checks were successful
Tests / Backend - Tests skipped: 7, passed: 27
Backend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 60.55% (333/550) * Lines of Code: 550 #### Quality Gates Summary No active quality gates.
Tests / Frontend - Lint, Tests et Build passed: 45
Frontend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 86.14% (230/267) * Lines of Code: 267 #### Quality Gates Summary No active quality gates.
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
2026-08-28 09:00:51 +00:00
2 changed files with 17 additions and 34 deletions

7
Jenkinsfile vendored
View File

@@ -334,13 +334,6 @@ stage('SonarQube Quality Gate') {
steps {
sh '''
set -a
. /opt/furious-ducks/secrets/tiptop-mail.env
set +a
test -n "${TURNSTILE_SITE_KEY}"
echo "Turnstile site key chargée (longueur: ${#TURNSTILE_SITE_KEY})"
docker build \
-t "${BACKEND_IMAGE}:${IMAGE_TAG}" \
backend

View File

@@ -1,5 +1,5 @@
import { useEffect, useRef } from 'react'
import { CAPTCHA_ENABLED, TURNSTILE_SITE_KEY } from '../config/captcha'
import { TURNSTILE_SITE_KEY } from '../config/captcha'
const TURNSTILE_SCRIPT_ID = 'cf-turnstile-script'
const TURNSTILE_SCRIPT_URL =
@@ -10,9 +10,7 @@ export default function Captcha({ onToken }) {
const widgetIdRef = useRef(null)
useEffect(() => {
if (!CAPTCHA_ENABLED || !TURNSTILE_SITE_KEY || !containerRef.current) {
return
}
if (!TURNSTILE_SITE_KEY || !containerRef.current) return
let cancelled = false
@@ -29,7 +27,7 @@ export default function Captcha({ onToken }) {
try {
window.turnstile.remove(widgetIdRef.current)
} catch {
// Widget déjà supprimé
// Rien à faire
}
widgetIdRef.current = null
@@ -43,7 +41,6 @@ export default function Captcha({ onToken }) {
sitekey: TURNSTILE_SITE_KEY,
language: 'fr',
size: 'flexible',
appearance: 'always',
callback: (token) => {
onToken(token)
@@ -69,28 +66,23 @@ export default function Captcha({ onToken }) {
return
}
if (existingScript) {
existingScript.addEventListener('load', renderWidget, {
once: true,
})
const previousCallback = window.onloadTurnstileCallback
return () => {
cancelled = true
}
window.onloadTurnstileCallback = () => {
previousCallback?.()
renderWidget()
}
const script = document.createElement('script')
if (!existingScript) {
const script = document.createElement('script')
script.id = TURNSTILE_SCRIPT_ID
script.src = TURNSTILE_SCRIPT_URL
script.async = true
script.defer = true
script.id = TURNSTILE_SCRIPT_ID
script.src = `${TURNSTILE_SCRIPT_URL}&onload=onloadTurnstileCallback`
script.async = true
script.defer = true
script.addEventListener('load', renderWidget, {
once: true,
})
document.head.appendChild(script)
document.head.appendChild(script)
}
return () => {
cancelled = true
@@ -102,7 +94,7 @@ export default function Captcha({ onToken }) {
try {
window.turnstile.remove(widgetIdRef.current)
} catch {
// Widget déjà supprimé
// Rien à faire
}
}
@@ -110,9 +102,7 @@ export default function Captcha({ onToken }) {
}
}, [onToken])
if (!CAPTCHA_ENABLED || !TURNSTILE_SITE_KEY) {
return null
}
if (!TURNSTILE_SITE_KEY) return null
return (
<div