Skip to content

[AI] What to change: The sync between color chosen at the Branding page under Sett... - #215

Open
burkongla wants to merge 1 commit into
mainfrom
agent/slack-a1a4a7dd-what-to-change-the-sync-between-color-ch
Open

[AI] What to change: The sync between color chosen at the Branding page under Sett...#215
burkongla wants to merge 1 commit into
mainfrom
agent/slack-a1a4a7dd-what-to-change-the-sync-between-color-ch

Conversation

@burkongla

Copy link
Copy Markdown
Contributor

Automated PR

Task: What to change: The sync between color chosen at the Branding page under Sett...
Description: What to change: The sync between color chosen at the Branding page under Settings for Admin, and the color used in the dp icon for the project in question.
• Make sure that the “Primary color” chosen under the Branding page, is synced with the color shown in the dp icon for the project, if there is no logo image uploaded for the project.
Do not change: Anything else than what is listed.
Acceptance criteria: When all points listed under “Description and specific values” are implemented the task is done
Source: slack
Requested by: U04E9DZ5ELF
Classification: visual

Changes

Sync the project 'dp icon' (avatar fallback shown when no logo is uploaded) with the 'Primary color' saved on the Branding settings page. Currently the fallback uses hardcoded colors (bg-brand-primary, bg-[#3c2ec5], or a hash-based color via getAvatarColorHexForId) instead of brandingData.primary_color, which is already fetched by useProjectBranding (select *) in all affected views.

Security Review

Status: warn
No dependency changes (package.json/lock untouched, npm audit skipped) and no secrets, auth, or injection-into-HTML issues. However, the diff wires an unvalidated free-text DB field (primary_color) into inline style attributes on public, cross-tenant pages, enabling CSS injection via SSR — validate the hex format at render, save, and database layers.

Warnings:

  • src/app/support/page.tsx: Untrusted, unvalidated brandingData.primary_color (a free-text DB value set by project owners in src/app/settings/branding/page.tsx line 138 — plain text Input, no format validation) is injected into inline style attributes on public support pages viewed by other users. React does not sanitize style values during SSR: a value like red;background-image:url(https://evil.example/beacon) serializes into the style attribute of the server-rendered HTML, enabling cross-tenant CSS injection (tracking beacons, UI spoofing/defacement of the support widget). Same pattern at lines 480 and 532, src/app/support/chat/page.tsx:647, src/app/support/get-support/page.tsx:73, src/app/projects/[id]/page.tsx:160, and src/components/layout/top-bar.tsx:64. Not script-executing XSS (CSS can't run JS in modern browsers), so medium rather than high.
  • src/app/settings/branding/page.tsx: The primary color text input accepts any string with no client-side format validation before persisting via updateBranding.mutateAsync — this is the write path that makes the CSS-injection issue above reachable. The hidden type="color" input is constrained, but the visible text Input is not.

🤖 Generated by githelp-support agent team

…age under Sett...

Task: a1a4a7dd
Source: slack
Requested by: U04E9DZ5ELF
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for githelp-support ready!

Name Link
🔨 Latest commit bc7194d
🔍 Latest deploy log https://app.netlify.com/projects/githelp-support/deploys/6a8de5f065dd2b0008200db0
😎 Deploy Preview https://deploy-preview-215--githelp-support.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant