Daily Shaarli

All links of one day in a single page.

Previous day

October 24, 2023

Next day

Eleventy plugin for generating social images (using SVG) | Notes | Kumar Abhishek
thumbnail

How I created an eleventy plugin to automatically generate social-images for your website and blog posts.

Dangers of Regular Expressions in JavaScript | Sonar
thumbnail

A deep investigation into regular expression denial of service (ReDoS) vulnerabilities in JavaScript

Backtracking
It might not seem obvious, but most problems with regular expressions stem from failing to match part of the string they are being evaluated against. Matching is easy, but not matching can cause a process called backtracking where the regular expression engine will go back over choices that it made and try alternatives.

Lost in spaces
Let's have a look at an example. In the Stack Overflow outage, the offending regular expression was /^[\s\u200c]+|[\s\u200c]+$/. Let's break down what each part means: