Skip to content

fix: expose tagline field and harden XSS escaping in member directory#1680

Merged
bokelley merged 6 commits into
mainfrom
bokelley/sigma-search-fix
Mar 25, 2026
Merged

fix: expose tagline field and harden XSS escaping in member directory#1680
bokelley merged 6 commits into
mainfrom
bokelley/sigma-search-fix

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Mar 25, 2026

Summary

  • Expose the tagline field in the organization member profile editor so companies can set a short headline that appears on directory cards and improves search ranking (resolves escalation Add tracker_script type to URL assets for measurement SDKs #148)
  • Harden HTML escaping across the member directory and detail views to prevent stored XSS via user-supplied fields

Changes

Tagline field (member-profile.html):

  • Add tagline text input with maxlength=200 and placeholder
  • Populate from profile data on load, include in save and preview

XSS escaping (member-card.js, members.html):

  • Escape display_name, description, tagline, markets, offerings with escapeHtmlSafe()/escapeHtml()
  • Escape logo_url and display_name in img src/alt attributes
  • Escape contact_email, contact_phone, contact_website, linkedin_url, twitter_url in detail view

Server-side (member-profiles.ts, already on main):

  • 200-character tagline length validation on POST and PUT endpoints

Escalation context

Test plan

  • Log in as an org member (non-personal account) and verify tagline field appears in profile editor
  • Set a tagline and save — verify it persists on reload
  • View the member in the directory — verify tagline appears on card
  • Click into detail view — verify tagline appears below name
  • Verify XSS payloads in display_name, tagline, description are escaped (not executed)
  • Search for terms in the tagline — verify member appears in results

🤖 Generated with Claude Code

bokelley and others added 6 commits March 25, 2026 11:30
The tagline column exists in the database and is already indexed for
search, but the profile editor UI was hardcoding tagline to null on
every save. This adds a tagline input to the form, populates it on
load, includes it in save data and card preview.

Resolves Escalation #148 (Bryan Szekely / Sigma Software).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
XSS: tagline in members.html and description in member-card.js were
rendered without escaping. Now that tagline is user-editable, both paths
are reachable. Add server-side 200-char limit on tagline in POST and PUT.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
display_name, description, markets, offerings, and logo_url were
rendered unescaped in both the card and detail views. Wrap all
user-supplied values with escapeHtml/escapeHtmlSafe to prevent XSS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Apply escapeHtml to contact_email, contact_phone, contact_website,
linkedin_url, and twitter_url to prevent attribute injection in the
member detail view.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bokelley bokelley changed the title fix: expose tagline field in member profile editor fix: expose tagline field and harden XSS escaping in member directory Mar 25, 2026
@bokelley bokelley merged commit 9aaaf60 into main Mar 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant