Site : lien « retourner à l'arbre partagé » retiré (return_url non vérifié)

Le paramètre ?source=app-shared&return_url= affichait n'importe quelle adresse
dans un lien du site. L'app ne l'envoie plus, le bloc part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
IliesAllaliandClaude Opus 5.5 committed 2026-09-30 17:58:45 +02:00
1 parent 63c38e79d2
commit fc55604987
3 files changed
-29

No files matched your search

-26
View File
@@ -894,7 +894,6 @@ const readSource = () => new URLSearchParams(window.location.search).get('source
export default function App({ locale = 'fr' }) {
const t = COPY[locale]
const [headerElevated, setHeaderElevated] = useState(false)
const [sharedReturnUrl, setSharedReturnUrl] = useState('')
const scrollMilestonesRef = useRef({ half: false, full: false })
// La page est prérendue à la compilation, sans URL : le premier rendu est toujours la variante
@@ -914,28 +913,6 @@ export default function App({ locale = 'fr' }) {
analytics.capture('page_viewed', buildEventProps())
}, []) // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => {
if (source !== 'app-shared') {
setSharedReturnUrl('')
return
}
const returnUrlFromQuery = new URLSearchParams(window.location.search).get('return_url') || ''
try {
if (returnUrlFromQuery) {
sessionStorage.setItem('parenthese_return_url', returnUrlFromQuery)
setSharedReturnUrl(returnUrlFromQuery)
return
}
const fromSession = sessionStorage.getItem('parenthese_return_url') || ''
setSharedReturnUrl(fromSession)
} catch {
setSharedReturnUrl(returnUrlFromQuery)
}
}, [source])
// Bordure du header au défilement + paliers de scroll pour PostHog
useEffect(() => {
const onScroll = () => {
@@ -1112,9 +1089,6 @@ export default function App({ locale = 'fr' }) {
<h2 className="t-d2">{t.final.title[0]}<em className="s">{t.final.title[1]}</em></h2>
<p className="lede">{t.final.lede}</p>
<button type="button" onClick={() => goToSignup('footer')} className="btn p">{t.cta}</button>
{source === 'app-shared' && sharedReturnUrl && (
<a href={sharedReturnUrl} className="back">{t.final.back}</a>
)}
</div>
</section>
-2
View File
@@ -111,7 +111,6 @@ export const COPY = {
final: {
title: ['Commencez par ', 'un seul visage'],
lede: "Le vôtre, ou celui de quelqu'un que vous aimeriez garder.",
back: "Ou retourner explorer l'arbre partagé",
},
footer: {
label: 'Pied de page',
@@ -220,7 +219,6 @@ export const COPY = {
final: {
title: ['Start with ', 'a single face'],
lede: "Yours, or the face of someone you'd like to keep close.",
back: 'Or go back to the shared tree',
},
footer: {
label: 'Footer',
-1
View File
@@ -191,7 +191,6 @@ html.logo-intro .lk-nom { animation: lk-nom 700ms var(--ease-out) 380ms both; }
/* fin */
.final { background: var(--peche-50); text-align: center; padding: clamp(64px, 9vw, 112px) var(--gut); }
.final .wrap { display: grid; justify-items: center; gap: 22px; }
.final .back { font: 500 14px var(--sans); color: var(--encre2); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 28px; font: 400 13px var(--sans); color: var(--doux); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }