mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
27 issues fixed from multi-dimensional code review (4 Critical, 6 High, 11 Medium, 6 Low): Security (Critical): - Escape HTML in OAuth authorization page to prevent XSS (C1) - Add CSRF protection to OAuth authorize flow (C2) - Replace bypassable regex sanitizer with sanitize-html library (C3) - Enforce OAuth scopes on all Mastodon API routes (C4) Security (Medium/Low): - Fix SSRF via DNS resolution before private IP check (M1) - Add rate limiting to API, auth, and app registration endpoints (M2) - Validate redirect_uri on POST /oauth/authorize (M4) - Fix custom emoji URL injection with scheme validation + escaping (M5) - Remove data: scheme from allowed image sources (L6) - Add access token expiry (1hr) and refresh token rotation (90d) (M3) - Hash client secrets before storage (L3) Architecture: - Extract batch-broadcast.js — shared delivery logic (H1a) - Extract init-indexes.js — MongoDB index creation (H1b) - Extract syndicator.js — syndication logic (H1c) - Create federation-actions.js facade for controllers (M6) - index.js reduced from 1810 to ~1169 lines (35%) Performance: - Cache moderation data with 30s TTL + write invalidation (H6) - Increase inbox queue throughput to 10 items/sec (H5) - Make account enrichment non-blocking with fire-and-forget (H4) - Remove ephemeral getReplies/getLikes/getShares from ingest (M11) - Fix LRU caches to use true LRU eviction (L1) - Fix N+1 backfill queries with batch $in lookup (L2) UI/UX: - Split 3441-line reader.css into 15 feature-scoped files (H2) - Extract inline Alpine.js interaction component (H3) - Reduce sidebar navigation from 7 to 3 items (M7) - Add ARIA live regions for dynamic content updates (M8) - Extract shared CW/non-CW content partial (M9) - Document form handling pattern convention (M10) - Add accessible labels to functional emoji icons (L4) - Convert profile editor to Alpine.js (L5) Audit: documentation-central/audits/2026-03-24-activitypub-code-review.md Plan: documentation-central/plans/2026-03-24-activitypub-audit-fixes.md
170 lines
3.6 KiB
CSS
170 lines
3.6 KiB
CSS
/* ==========================================================================
|
|
Compose Form
|
|
========================================================================== */
|
|
|
|
.ap-compose__context {
|
|
background: var(--color-offset);
|
|
border-left: var(--border-width-thickest) solid var(--color-primary);
|
|
border-radius: var(--border-radius-small);
|
|
margin-bottom: var(--space-m);
|
|
padding: var(--space-m);
|
|
}
|
|
|
|
.ap-compose__context-label {
|
|
color: var(--color-on-offset);
|
|
font-size: var(--font-size-s);
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.ap-compose__context-author a {
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.ap-compose__context-text {
|
|
border: 0;
|
|
font-size: var(--font-size-s);
|
|
line-height: var(--line-height-loose);
|
|
margin: var(--space-xs) 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.ap-compose__context-link {
|
|
color: var(--color-on-offset);
|
|
font-size: var(--font-size-s);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ap-compose__form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-m);
|
|
}
|
|
|
|
.ap-compose__editor {
|
|
position: relative;
|
|
}
|
|
|
|
.ap-compose__textarea {
|
|
background: var(--color-background);
|
|
border: var(--border-width-thick) solid var(--color-outline);
|
|
border-radius: var(--border-radius-small);
|
|
color: var(--color-on-background);
|
|
font-family: inherit;
|
|
font-size: var(--font-size-m);
|
|
line-height: var(--line-height-prose);
|
|
padding: var(--space-s);
|
|
resize: vertical;
|
|
width: 100%;
|
|
}
|
|
|
|
.ap-compose__textarea:focus {
|
|
border-color: var(--color-primary);
|
|
outline: var(--border-width-thick) solid var(--color-primary);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
.ap-compose__cw {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.ap-compose__cw-toggle {
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
font-size: var(--font-size-s);
|
|
color: var(--color-on-offset);
|
|
}
|
|
|
|
.ap-compose__cw-input {
|
|
border: var(--border-width-thin) solid var(--color-outline);
|
|
border-radius: var(--border-radius-small);
|
|
background: var(--color-offset);
|
|
color: var(--color-on-background);
|
|
font: inherit;
|
|
font-size: var(--font-size-s);
|
|
padding: var(--space-s);
|
|
width: 100%;
|
|
}
|
|
|
|
.ap-compose__cw-input:focus {
|
|
border-color: var(--color-primary);
|
|
outline: none;
|
|
}
|
|
|
|
.ap-compose__visibility {
|
|
border: var(--border-width-thin) solid var(--color-outline);
|
|
border-radius: var(--border-radius-small);
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-s) var(--space-m);
|
|
padding: var(--space-m);
|
|
}
|
|
|
|
.ap-compose__visibility legend {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.ap-compose__visibility-option {
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
font-size: var(--font-size-s);
|
|
}
|
|
|
|
.ap-compose__syndication {
|
|
border: var(--border-width-thin) solid var(--color-outline);
|
|
border-radius: var(--border-radius-small);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-m);
|
|
}
|
|
|
|
.ap-compose__syndication legend {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.ap-compose__syndication-target {
|
|
cursor: pointer;
|
|
display: flex;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.ap-compose__actions {
|
|
align-items: center;
|
|
display: flex;
|
|
gap: var(--space-m);
|
|
}
|
|
|
|
.ap-compose__submit {
|
|
background: var(--color-primary);
|
|
border: 0;
|
|
border-radius: var(--border-radius-small);
|
|
color: var(--color-on-primary, var(--color-neutral99));
|
|
cursor: pointer;
|
|
font-size: var(--font-size-m);
|
|
font-weight: 600;
|
|
padding: var(--space-s) var(--space-l);
|
|
}
|
|
|
|
.ap-compose__submit:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.ap-compose__cancel {
|
|
color: var(--color-on-offset);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.ap-compose__cancel:hover {
|
|
color: var(--color-on-background);
|
|
text-decoration: underline;
|
|
}
|