Commit Graph

2467 Commits

Author SHA1 Message Date
Jakub Zych
b8487b028b test(quick-261115-cha): cover cross-plugin mail layouts through overrides, the editor and the index
- TestCrossPluginLayoutOverride: a template override naming the lender's
  layout, a customized lender layout, Editor Validate and Preview
- TestCrossPluginLayoutSync (Docker): SyncIndex points the borrower rows'
  layout_id at the lender's layout row and keeps it on a second run
2026-11-15 09:09:58 +01:00
Jakub Zych
1fb4254291 feat(quick-261115-cha): let a mail template use another plugin's layout by full code
- resolveLayoutLocked: after the plugin's own alias and the built-in
  aliases, a full layout name already in the catalog resolves to itself;
  an unregistered full name fails with a require-the-owner hint
- another plugin's short alias and the short-alias error are unchanged
- TestCrossPluginLayout covers register, send, errors and precedence
- postcard README and docs/services/mail.md describe the rule
2026-11-15 09:08:21 +01:00
Jakub Zych
42ab223e79 test(35): complete UAT - 12 passed, 1 issue 2026-11-15 08:57:50 +01:00
Jakub Zych
358da17aeb docs(quick-261114-p5n): style the user and paymentgateway plugin mail layouts 2026-11-14 18:48:31 +01:00
Jakub Zych
4ef3aa1f90 test(35): seed UAT re-test rows after re-verification 2026-11-14 18:46:48 +01:00
Jakub Zych
3541c9bda3 docs(35): re-verify after quick 261114-p5m - all automated checks pass, human verification needed 2026-11-14 18:46:33 +01:00
Jakub Zych
5735e7c7d5 test(35): reconcile UAT gaps G-35-1 and G-35-8 as resolved by 35-07 2026-11-14 18:38:19 +01:00
Jakub Zych
8fabf87b8a docs(quick-261114-p5m): fix CR-02 residual quoted end tags in the mail URL check 2026-11-14 18:38:18 +01:00
Jakub Zych
f1f284a0f9 test(quick-261114-p5m): pin end tags inside quoted attributes in the mail URL check
- refuse cases for all eight probe payloads (noscript href and handler,
  svg style, title and textarea, noembed, xmp, conditional comment)
- send fallback and editor refusal for the three that survive rendering
- escaped_send subtests check svg title/textarea sends with an x/net/html
  parser oracle, scripting on and off
- accept cases for conditional comments, quoted CSS, a safe noscript
  link and a literal comment opener in an attribute
2026-11-14 18:37:08 +01:00
Jakub Zych
e47d4ae6cf docs(quick-261114-p5m): amend the mail URL scheme note for quoted end tags 2026-11-14 18:25:32 +01:00
Jakub Zych
d6ac0aeb4b fix(quick-261114-p5m): read tags across raw-text and comment ends in the mail URL check
- unsafeMarkupAt runs the existing HTML reading, then a tag reading in
  which attribute quoting alone decides where a tag ends
  (NextIsNotRawText after raw-text start tags, comment openers blanked)
- both readings share unsafeAttrs; existing refusals keep their message
  and snippet
- svg/style end tag inside a quoted attribute is refused at check, save
  and send; README and docs/services/mail.md describe the second reading
2026-11-14 18:25:13 +01:00
Jakub Zych
d8137c17d4 docs(35): align disposition frontmatter with fixed CR-01, CR-02, WR-01 2026-11-14 18:01:43 +01:00
Jakub Zych
c1e8e57e29 docs(35): re-verify after review fixes - CR-02 quoted end-tag residual open 2026-11-14 18:01:32 +01:00
Jakub Zych
7bd0eaaaee docs(35): shorten COVERAGE.md opt-out reason to pass the api-coverage gate 2026-11-14 17:52:00 +01:00
Jakub Zych
35c4081529 docs(35): reconcile disposition for re-titled CR-01, CR-02, WR-01 fixes 2026-11-14 17:47:41 +01:00
Jakub Zych
b729a8a605 docs(35): record code review disposition 2026-11-14 17:46:28 +01:00
Jakub Zych
73843dbf26 docs(35): add code review fix report 2026-11-14 17:46:27 +01:00
Jakub Zych
1d2e7e87fa docs(35): amend the mail URL scheme check note for the review fixes 2026-11-14 17:40:46 +01:00
Jakub Zych
8deb56ff0b fix(35): WR-03 treat data: in a site name as a data URL only with ; or ,
scriptURLText took data: followed by any non-space character as a data
URL, so names such as Data:Lab, Big Data:Summit and data:Science were
refused on the Branding form and dropped from mail, contrary to the docs.
A data URL now needs its optional MIME type and the ; or , every data URL
has. javascript: and vbscript: keep matching with whitespace after the
colon, since such a URL still runs.
2026-11-14 17:40:13 +01:00
Jakub Zych
31de2ff90f fix(35): WR-02 drop the whole-document event-handler regex
validateHTML ran (?i)\son[a-z]+\s*= over the rendered document, text
included, so a variable such as "buy one = get one free" stopped its own
message, and it is what made Online=Shop in the footer a send failure.
The tokenizer walk refuses every on* attribute, and since CR-02 it also
reads raw-text element and comment content as markup, so the regex is
dropped. Text shaped like a handler is now sent; such site names are shown
and saved, and the Branding refusal copy no longer mentions onclick=.
2026-11-14 17:37:52 +01:00
Jakub Zych
baba524caf fix(35): WR-01 strip whitespace before the list, meta, CSS and comment scheme checks
Single-URL attributes removed ASCII whitespace and control characters
before looking for a scheme, the list-valued, meta content, style and
comment checks did not, so values="java	script:..." and a tab-split
meta refresh passed. The stripping is factored out as stripURLSpace and
used by every scheme check.
2026-11-14 17:32:14 +01:00
Jakub Zych
1d481bb02d fix(35): CR-02 check raw-text element and comment content as markup
The tokenizer-only walk read noscript, title, textarea, style, xmp and the
other raw-text elements as one text token and never looked inside, so an
unencoded javascript: link in <noscript> or <svg><title> passed the check
and was sent. A mail client renders with scripting off and parses svg
children as markup, so the raw content of those elements, and comment
data (Outlook conditional comments), is now checked again as markup;
nesting deeper than eight levels is refused.
2026-11-14 17:30:07 +01:00
Jakub Zych
2dbee30530 fix(35): CR-01 check the site name where the layouts print it
UnsafeText checked the escaped name on its own, so a name starting with
on<letters>= (Online=Shop, onboarding=team) passed, was saved, and then
failed every default/system-layout send once the footer printed it after
"© <year> ". The name is now checked in the footer, header span and alt
contexts, so such a name is dropped at render and refused on the Branding
form instead of stopping mail.
2026-11-14 17:25:53 +01:00
Jakub Zych
980ba48764 docs(35): re-verify after gap closure 35-08/35-09 - CR-01 residual and CR-02 open 2026-11-14 16:26:50 +01:00
Jakub Zych
9195bc4822 docs(35): record code review disposition 2026-11-14 16:18:30 +01:00
Jakub Zych
f1d22353ca docs(35): re-review gap closure - CR-01 residual and scheme-check bypass found 2026-11-14 16:18:18 +01:00
Jakub Zych
9ff6e1a2e8 docs(35-09): record plan completion in state and roadmap 2026-11-14 16:09:00 +01:00
Jakub Zych
dce002ee45 docs(35-09): complete site name safety unit tests plan 2026-11-14 16:08:01 +01:00
Jakub Zych
fbbfce0702 docs(35): validation map for the site name safety gap
- CR-01 rows for the send path, the decoded scheme check and the admin side;
  WR-01 and WR-05 rows with their go test commands
- CR-01 status replaces the open item on the Branding site name
- Manual-Only row for the Branding refusal on sm-demo-app; Wave 0 lists the
  three new test files
2026-11-14 16:06:59 +01:00
Jakub Zych
e54be76cf0 test(35): self-test compares the planted consumer's go.mod
- the workspace-modfile case copies the planted consumer's go.mod before the
  modfile run and compares it after with cmp -s (IN-03)
- drops the git status check on the dirty-sibling fixture, which asserted
  against the wrong repository; the replace-line grep stays
2026-11-14 16:00:23 +01:00
Jakub Zych
54617f78d1 test(cabana): unsafe Branding site names refused at save, stored ones never block saves or sends
- TestMailSiteNameSafety: a javascript: site name is a 422 on site_name in en
  and pl and stores nothing; Big Data: Summit and Metadata: Weekly save; the
  Branding preview drops an unsafe draft name; a name stored before the check
  never refuses a template or layout save or stops a send; a mail.from display
  name with a colon shows on the default and system layouts
- the mail screens env reads mail.from from its configuration (default
  unchanged), so a mutate hook can set the sender
- check-phase35.sh DOCKER_TESTS requires TestMailSiteNameSafety
2026-11-14 15:56:18 +01:00
Jakub Zych
446a77efbf test(postcard): decoded URL scheme check, unsafe inlined output and the literal footer
- TestURLSchemeCheck: prose and scheme words in titles or queries pass; every
  URL-bearing attribute, CSS, meta refresh and each entity-encoded or
  whitespace-split script URL is refused with a snippet at the markup; a layout
  override with javascript&#58; falls back to the file version with inlining on
  and off; the editor refuses it on content_html and CSS URLs on content_css
- TestInlineUnsafeOutput: a failing inlined result sends the style-block
  version with one warning per layout
- TestFooterSiteNameLiteral: the footer prints the site name escaped and
  literally on the default and system layouts; body stays Markdown
- check-phase35.sh GO_TESTS requires the three tests
2026-11-14 15:47:35 +01:00
Jakub Zych
e0016e0c0d test(postcard): site names on the built-in layouts never stop a send
- TestSiteNameSend: mail.from "Metadata: Weekly" and Branding "Big Data: Summit"
  show in header, footer and text on the default and system layouts, on the
  file-version, override and override-failure fallback paths
- TestUnsafeSiteNameDropped: unsafe names are left out on every path with one
  value-free warning per source; editor saves and previews are not refused
- TestUnsafeText pins the safe and unsafe texts
- check-phase35.sh GO_TESTS requires them and TestMailSafetySmoke
2026-11-14 15:40:57 +01:00
Jakub Zych
8751f92230 docs(35-08): record plan completion in state and roadmap 2026-11-14 15:32:25 +01:00
Jakub Zych
c4d0bbecc4 docs(35-08): complete mail URL scheme check and site name safety plan 2026-11-14 15:31:10 +01:00
Jakub Zych
15d3e6fb8d fix(postcard): print the site name literally in the built-in layouts' footer
- the footer partial gains a text argument, printed as a paragraph
  through html/template and verbatim in the text part; body stays
  Markdown for callers that pass Markdown on purpose
- the default and system layouts pass the copyright line as text, so
  *Acme*, Acme <Studio> and [x](url) appear as typed, as in the header
  (WR-01)
- README partial table, layouts and Branding paragraphs; docs partials
  table and built-in layouts paragraph
- TestMailSafetySmoke/literal_footer
2026-11-14 15:29:57 +01:00
Jakub Zych
cd91cf2e64 fix(postcard): an inlined result that fails the safety check sends the style block
- inlineHTML treats a failing post-inline check like an inliner error:
  the un-inlined HTML, which already passed validateHTML, is sent with
  its style block and the rate-limited inline:<layout> warning
- mail is never stopped by the inliner, as the docs promise (WR-05)
- README and docs/services/mail.md describe the check before inlining
- TestMailSafetySmoke/inline_unsafe_output
2026-11-14 15:25:03 +01:00
Jakub Zych
701ce8979d docs(35): UI-SPEC copy for the unsafe site name refusal 2026-11-14 15:20:45 +01:00
Jakub Zych
3a725469c6 fix(postcard,cabana): unsafe site names never stop a send and are refused at save
- postcard.UnsafeText: a text a layout prints is unsafe when, escaped,
  it fails the rendered-HTML checks or holds a script or data URL at a
  scheme boundary ("Big Data: Summit" is safe)
- siteNameFrom/layoutSiteName: an unsafe Branding name falls back to the
  mail.from display name, an unsafe one of those gives no name; one
  rate-limited warning per source (site_name:branding, site_name:mail.from),
  never the value; file version, override, fallback and editor alike
- the Branding preview of an unsafe draft name renders without it
- MailBrandSetting.BeforeValidate: 422 on site_name with
  backend::lang.mail.brand.site_name_unsafe (en/pl)
- settings Put localizes a BeforeValidate refusal's phrase keys, as a
  controller save does
- TestMailSafetySmoke/unsafe_site_name, TestMailBrandSiteName/unsafe_name_refused
2026-11-14 15:20:29 +01:00
Jakub Zych
13ab905f8d fix(postcard): check URL schemes in decoded attribute values, not in text
- validateHTML keeps the raw tag and handler regexes and reads the rest
  through unsafeMarkup: x/net/html tokenizer, decoded attribute values,
  prefix check on URL attributes, whole-value check on CSS, list
  attributes, meta content and comments; any on* attribute is refused
- text is not a URL: "Metadata: Weekly" or "Big Data: Summit" as a site
  name or body text no longer stops a send (CR-01)
- entity-encoded javascript&#58; is refused whether or not the layout
  opts out of inlining (WR-05)
- draft layout CSS is checked as a style element
- fixtures that pinned prose as unsafe now carry markup-level URLs;
  the 35-07 subtest pinning an unsafe stored name is removed
- TestMailSafetySmoke prose_site_name and encoded_scheme
2026-11-14 15:13:35 +01:00
Jakub Zych
274dff4458 docs(35): decision note for the mail URL scheme check and site name safety 2026-11-14 15:05:56 +01:00
Jakub Zych
f4613fd26b docs(35): record gap-closure planning in state 2026-11-14 15:02:40 +01:00
Jakub Zych
6e8cead959 docs(35): plan gap closure for CR-01
Two gap-closure plans confirmed by the user:
- 35-08: URL-scheme check on decoded attribute values instead of the whole
  document, unsafe site names dropped at render with a warning and refused
  on the Branding form (postcard.UnsafeText), the inlined result never
  stops mail, literal site name in the footer (CR-01, WR-01, WR-05)
- 35-09: regression and unit tests, new names required by
  check-phase35.sh, IN-03 self-test fix, validation map
2026-11-14 14:59:30 +01:00
Jakub Zych
0aa38db8b5 docs(35): re-verify phase after gap closure - CR-01 gap found 2026-11-13 22:33:37 +01:00
Jakub Zych
b1f85c2177 docs(35): record code review disposition 2026-11-13 22:23:46 +01:00
Jakub Zych
75669b343f docs(35): add code review report 2026-11-13 22:23:31 +01:00
Jakub Zych
0bef6b3098 docs(35-07): update state and roadmap after plan 35-07 2026-11-13 22:11:33 +01:00
Jakub Zych
d00e2c8d6f docs(35-07): complete gap-closure tests plan
- SUMMARY for the G-35-1 and G-35-8 tests, the read-only consumers stage
  and the validation map
2026-11-13 22:11:03 +01:00
Jakub Zych
a3ce097455 docs(35): validation map for the gap closure
- 35-VALIDATION.md: G-35-1 and G-35-8 rows (postcard unit and Postgres,
  cabana Postgres, SPA, consumers through scratch modfiles); D-05 and the
  default-layout byte-identity rows superseded by the 35-05/35-06 notes;
  manual re-runs of UAT tests 1 and 8 (test 8 scoped to the built-in
  layouts), a real-inbox check and the deferred plugin follow-up check;
  open item: site name not checked for a URL scheme at save time
- 35-UAT.md: closure_note and rerun_scope on G-35-8 (framework part closed,
  plugin part deferred); status and results unchanged
2026-11-13 22:09:53 +01:00
Jakub Zych
a9381165c7 test(admin): mail template locale switcher
- LocaleVariantSwitcher: current flag, option values and locales, the label
  through the control id, the query kept on navigation, no navigation for the
  open version, selection restored when a guard throws, props updates
- FormView: no switcher with one variant; with unsaved edits switching asks
  the unsaved-changes confirm, stays on cancel and opens the sibling on confirm
- check-phase35.sh requires LocaleVariantSwitcher.test.ts (ADMIN_FILES)
2026-11-13 21:38:36 +01:00