Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security NachrichtenFoto-News: Nikons Vollformatkamera ohne Sucher, neues Luminar(24.09.2026 um 16:21 Uhr)
IT Security NachrichtenIs your Apple Watch 12 or Ultra 4 randomly restarting? Here’s the fix(24.09.2026 um 15:42 Uhr)
IT Security DownloadsGitHub Release: nextcloud/server v35.0.1 (24.09.2026)(24.09.2026 um 15:54 Uhr)
IT Security DownloadsBlueStacks Download - Android-Apps auf dem PC nutzen(24.09.2026 um 15:18 Uhr)
IT NachrichtenFive years later, you can finally buy Google Beam(24.09.2026 um 15:26 Uhr)
IT Security NachrichtenFoto-News: Nikons Vollformatkamera ohne Sucher, neues Luminar(24.09.2026 um 16:21 Uhr)
IT Security NachrichtenIs your Apple Watch 12 or Ultra 4 randomly restarting? Here’s the fix(24.09.2026 um 15:42 Uhr)
IT Security DownloadsGitHub Release: nextcloud/server v35.0.1 (24.09.2026)(24.09.2026 um 15:54 Uhr)
IT Security DownloadsBlueStacks Download - Android-Apps auf dem PC nutzen(24.09.2026 um 15:18 Uhr)
IT NachrichtenFive years later, you can finally buy Google Beam(24.09.2026 um 15:26 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Building an RFC 5545 iCal File Generator — Line Folding, Escaping, and All

Building an RFC 5545 iCal File Generator — Line Folding, Escaping, and All iCal files look simple — just key-value pairs in a text format. But RFC 5545 has particular rules: CRLF line endings (not LF), lines must fold at 75 bytes with a …

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Building an RFC 5545 iCal File Generator — Line Folding, Escaping, and All




iCal files look simple — just key-value pairs in a text format. But RFC 5545 has particular rules: CRLF line endings (not LF), lines must fold at 75 bytes with a continuation character, text fields need escaping for commas/semicolons/backslashes/newlines, and every event needs a unique UID. Get any of these wrong and Google Calendar silently imports nothing.




iCalendar is the de facto standard for sharing events between calendar apps. Google Calendar, Apple Calendar, Outlook — they all speak it. Generating valid iCal files is more finicky than you'd think.



🔗 Live demo: https://sen.ltd/portfolio/ical-builder/

📦 GitHub: https://github.com/sen-ltd/ical-builder



Screenshot



Features:




  • RFC 5545 compliant ICS generation

  • Multiple events per calendar

  • Recurrence rules (daily, weekly, monthly, yearly)

  • Reminders / alarms (15 min, 1 hour, 1 day before)

  • All-day event support

  • Paste existing ICS to edit

  • Live preview as you type

  • Japanese / English UI

  • Zero dependencies, 38 tests





The ICS format



An iCalendar file is a structured text format with BEGIN/END blocks:




BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sen.ltd//ICal Builder//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20260413T120000Z
DTSTART:20260413T150000Z
DTEND:20260413T160000Z
SUMMARY:Team Meeting
LOCATION:Zoom
END:VEVENT
END:VCALENDAR






Looks simple. But several subtleties break you:






1. CRLF line endings



Not LF. RFC 5545 §3.1:




Lines of text SHOULD NOT be longer than 75 octets, excluding the line break.




The "line break" is \r\n. A file with just \n technically validates on lenient parsers but fails on strict ones. Always emit \r\n between lines.






2. Line folding at 75 bytes



If a line is longer than 75 bytes, you must fold it by inserting \r\n (CRLF + single space):




SUMMARY:This is a very long summary that exceeds seventy-five octets and th
erefore must be folded with a leading space on the continuation line






The folding happens at byte boundaries (not character boundaries), which matters for multi-byte characters like Japanese — don't split mid-character.




export function foldLine(line, width = 75) {
const result = [];
let i = 0;
while (i < line.length) {
if (i === 0) {
result.push(line.slice(0, width));
i += width;
} else {
result.push(' ' + line.slice(i, i + (width - 1)));
i += (width - 1);
}
}
return result.join('\r\n');
}






Continuation lines count the leading space as part of the 75-byte budget.






3. Text escaping



Certain characters in TEXT-typed fields need escaping:




export function escapeText(str) {
return str
.replace(/\\/g, '\\\\') // backslash first
.replace(/;/g, '\\;')
.replace(/,/g, '\\,')
.replace(/\n/g, '\\n');
}






Order matters: escape backslash first, otherwise the backslashes you introduce for the other escapes get double-escaped. Semicolons and commas are separators in some property values, so they must be escaped in free-text. Newlines become literal \n (two characters, backslash + n).






4. DTSTAMP is mandatory



Every VEVENT needs a DTSTAMP (creation time of the iCal record, not the event start). Forgetting this is a silent failure in some parsers:




BEGIN:VEVENT
UID:...
DTSTAMP:20260413T120000Z
DTSTART:20260413T150000Z
...
END:VEVENT









5. UIDs must be globally unique



If you generate multiple events with the same UID, calendar apps treat them as duplicates and only import one. Use a random ID scheme:




export function generateUID() {
return `${Date.now()}-${Math.random().toString(36).slice(2)}@sen.ltd`;
}






The @domain suffix is traditional but not strictly required.






6. Date formats





  • UTC: 20260413T150000Z (trailing Z)


  • Local: 20260413T150000 (no Z, interpreted in the default timezone)


  • All-day: 20260413 (just the date, no time)




export function formatDateTime(date, allDay = false) {
const pad = (n) => String(n).padStart(2, '0');
const Y = date.getUTCFullYear();
const M = pad(date.getUTCMonth() + 1);
const D = pad(date.getUTCDate());
if (allDay) return `${Y}${M}${D}`;
const h = pad(date.getUTCHours());
const m = pad(date.getUTCMinutes());
const s = pad(date.getUTCSeconds());
return `${Y}${M}${D}T${h}${m}${s}Z`;
}









Recurrence rules



RRULE is its own mini language:




RRULE:FREQ=WEEKLY;COUNT=10;BYDAY=MO,WE,FR
RRULE:FREQ=MONTHLY;BYMONTHDAY=15
RRULE:FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=25






The builder supports FREQ + COUNT + UNTIL + INTERVAL + BYDAY. More exotic rules (BYSETPOS, etc.) aren't in the UI but can be handled by the parser if present.






Series



This is entry #83 in my 100+ public portfolio series.



CTI Threat Relationship Graph4 Knoten / 3 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - Building an RFC 5545 iCal File Generator — Line Folding, Escaping, and All
id: ef94fba3-1086-462e-a603-1047c6e814ae
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Building an RFC 5545 iCal File" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Building an RFC 5545 iCal File Generator.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building an RFC 5545 iCal File Generator — Line Folding, Escaping, and All

Thematisch verwandte Begriffe: Building, 5545, iCal, File · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97179 | A security vulnerability has been detected in O2OA up to 9.5.3/10.0.2. T…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick