From patchwork Fri Nov 13 23:28:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 104012 X-Patchwork-Delegate: ticotimo@gmail.com Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1887.1794612498767864895 for ; Fri, 13 Nov 2026 15:28:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=TUliGALA; spf=pass (domain: gmail.com, ip: 209.85.215.172, mailfrom: ticotimo@gmail.com) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-cdba1b5ed8dso706110a12.1 for ; Fri, 13 Nov 2026 15:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794612498; x=1795217298; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=RSIKjSSWZj3gO2HyHo9P3nXqSSLQGHmKCp49MHLPs00=; b=TUliGALAvEjnJQYrNKIe9MZp8+21uMLIg2QU/oemiZP9LFFJByfPJSJ7l2qETrmMqV KMJsG2YtaA5ayWYYtRAPbQOqvs0sLRshT3Y4C9YuHXM5dtMh8h/o9ky0PWCO+LiNx/6J oS37/Fi+xIavKgVpz0jPqtScu/pPSWHxRbnL5vLRm1xvnGYmF/6NHkON1tuD+06EaCsI Nlww1c1vL80rdd8aDh2c+nuQ6bSxBAowwoT6VpV9WJYt+jKdVIQa+Cc1cVhDJ0Rz9Fdp GNwI5CmdZ2JFq3tk+79mpFR6TLgAyWu0kAn823TPAzBz+slOZJXXlWIoWGTrnvO4tEwF N59Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794612498; x=1795217298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=RSIKjSSWZj3gO2HyHo9P3nXqSSLQGHmKCp49MHLPs00=; b=HOeB0AzsTynRA89MbVKQejUQxN6NkKt86Ytab8dhfccbmIZXkOfGez7w56mDsl7Mlu kvoHolT215hvG65u5jv1tmGpIlLLTe2BgcUSAQMW4ny9Ku6ofRM+5Vv8gF8ZZDFLT8bN ObZuCMBmRMZIieyHiZDco+2cf/FV/c5p7Ith1Br813+7SIORBq3MwBodxhbQOB9QqjG6 uLXFcCfiYMfgxBBPP68jd+BtxRFxPD8OISBwTPCYceOBBqRmdH75dLUn7TEOb1ODiSvy iX6u6P9lVpg0OIvTAuw5N4DBMXVLDao4xnbS2oq7/nToQpm1+PZ7pNu8rr3+xfj044Nn oUuA== X-Gm-Message-State: APuU4Z970HyXiKXWiwwkV8pR1LEtqEZXC8swzQdjjdxYfcGJNFLFcJ2n vnysFtEimC3ELz/8zKnx/odLD1vCghiouDKjS9v4mQmX+0E8m6jfnwPNmAsu0nW1 X-Gm-Gg: AYBFou2O6nT5LxLHNmVZ/y1YFN0ZxIfwcAGjm4UfibEBtmm489LhHwYf5zO2KPrKdCn i/HwC690r/1SjILKWB0jRq7Fki+CZGJpJ9uS54Cv5NktBkh4AJHJJoKWwmf1Igbb/DftJOcxv4x SslmzBuz1PQoWEWOq0B2AG87poSmoo5Euw9pY40QCsE8NjpTHodip+4W3MSSBfbd8SY4JAx5RZj AKIe0Lj0KoqOm1UlPvaT/wCVS8/RrpqQGAik8UpjtWvsWvh/0sx3czFi6Or3mnOUhx8NjDKH1Bi XJBeQFuroRi34kAXn8aigNgRnOSm34XqEMKBb0nJzaKClhvFDtA4Z141kaW7PPuOTAKzFRYTMoY AijbFarw+r8TiMQ0N+12+Mr5Eqel9pBeTJGKKYlWi4QFe1KWCFPzoYKcxbWQupuYrV5EHRZc1Ow WTnwfQGY2VLw6S85VoxLlMKdNlT+etISGpm8Sy4OxS3g3dh98nFlJem6df3fXzvykUWlCBttrdR MkOjV4uQUmT335eSIANJMkBIfpFdj6M/tRpUBqKslhbje+/PRSafpR7tmQQRblsnkWrbPq15FD2 Vfnvz+ePhlgpwT9UfsbZ5qQPUCHgSwJo1+l8i8mMi417aw9lbfjgldQWSsNNig== X-Received: by 2002:a17:90b:180b:b0:3b0:8e66:1205 with SMTP id 98e67ed59e1d1-3b197d7cc87mr5812865a91.31.1794612497911; Fri, 13 Nov 2026 15:28:17 -0800 (PST) Return-Path: Received: from localhost.localdomain ([69.9.132.159]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b1bfb607e7sm1279789a91.3.2026.11.13.15.28.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Nov 2026 15:28:16 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: yocto-patches@lists.yoctoproject.org Cc: Tim Orling Subject: [layerindex-web][PATCH 1/4] requirements.txt: upgrade soupsieve to 4.1 Date: Fri, 13 Nov 2026 15:28:05 -0800 Message-ID: <20261113232808.96792-2-tim.orling@konsulko.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113232808.96792-1-tim.orling@konsulko.com> References: <20261113232808.96792-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 13 Nov 2026 23:28:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5340 Fixes CVE-2026-126190, CVE-2026-126191, CVE-2026-126192 and CVE-2026-126193 in soupsieve 2.9.2; CVE-2026-126190 is only fixed in 4.0. Soupsieve 4 needs Python 3.11.5 or later, provided by Ubuntu noble. AI-Generated: Claude Opus 5.5 Signed-off-by: Tim Orling --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f445b32..bfc3466 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-dateutil==2.9.0.post0 pytz==2026.3.post1 six==1.17.0 smmap==5.0.3 -soupsieve==2.9.2 +soupsieve==4.1 sqlparse==0.6.0 typing_extensions==4.16.0 tzdata==2026.3 From patchwork Fri Nov 13 23:28:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 104013 X-Patchwork-Delegate: ticotimo@gmail.com Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1891.1794612501000939556 for ; Fri, 13 Nov 2026 15:28:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=bHe3BhVB; spf=pass (domain: gmail.com, ip: 209.85.216.54, mailfrom: ticotimo@gmail.com) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-3b15e46698aso1505642a91.3 for ; Fri, 13 Nov 2026 15:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794612500; x=1795217300; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YH2JWvEuvkMYzDBCKE6xDXA1WMt5c0thkiHLiGRkmcw=; b=bHe3BhVB8A/4tFMIqMnhr3RfBNiDHV3gZVzgmBYI1RwFtfVouus9+u2xIXl+at6C7Z xKPSTZT9gGQC9J4X4RjrVKZOiRjQftbAbSi2H4mf+9W/H7oENrZAC/+qjCBk0KJXoWzq qO5deBa7fnORIrMsdmo9wc+2oL0IS+jK4esF4C/6a56DlI5CD570pMJ+YOg1nqUsZBnz GKx44tCww7tZaboasLy/I98HWiKnNl7xgOIqnk0/tjyzQkACYND7iffl9leN0884+59A qRPqVrfwR6QLw4RZ60OL7+RYAtC05Bv7xSSayl5k28BH2oPJKHZSnnT4xQDBzEujraoM /lRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794612500; x=1795217300; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=YH2JWvEuvkMYzDBCKE6xDXA1WMt5c0thkiHLiGRkmcw=; b=DbUPsRqzE/w0HSXTCMVurTs7mEO0hhGEty+3s7jNtsvYNeeOUS0hlfU2h4YIOQjPv8 lZl+EQBRCbh/NOedGOmTLas4/QuHIcEtpVqzVGIlKCEoI8HwTX4MnMXduWSxEH0cc8NO uwJnIXoQvrAv+sZFAgJ2uSuc1/Xd3hdIn+cqedI+NP2do13ZwBYQnLthY4CWvd+w+H64 7rj2zLUxfOz2H/ML4ePMZHtAtn3iIUu/nunB92Ixfh9dyFihPGKuLZc3hk+9JDRKtCpr w9R3Zf85H0D/nyEBolvYinZtxX6QTpC2a2xZTkfSzNaiM0W3nt5rGnRWo0RTxgJwxE7q H7kg== X-Gm-Message-State: APuU4Z8uR0t+GfTbHNgsiCLl+/Gh2NOl0LcW3QfEAGIErA44KQAerhUm 6wM0ShTUD3VnQ/o/Y8KNfbvVH8YR5mxYCSoFjQSxKCn/zIKcIN0owtYUqfXlPCPf X-Gm-Gg: AYBFou2Vj/3s0TdDfhDCKvZYFsjIk+Zm2OR3vqbT46AMhz9SeG9zo1ps2UFTR3ZG9+f KODm+XXzilu+e7JBEdzHgN9V30Am8jWCr9s1MlhXvtHnoHtvGMIS8ARpG9UODTtcWHRAiKFQ13e ovWBJ5OE9tI6uhnt/HF31w1y8GtRFba+Q+++gQpacCJRT1ZaGxzt5iT6Y0qVUebPS8CMYOdTOfy rmEFVX14+FC1R6VbTGFa0h4JXLsEbuP0+6nvJ/+y3IFUwiR3X/FRmBj7tKf1JeCPQjAJeGlGSwx lvxWSGOTshAIFgWEvpNmIKKcE2IDZVxgkze8N7eBGnyZ03N60CZG0lqSzhtDcuqaWYSi7o+D30B J0zPFB0TRebeyYsNdgcVyp2Zo3cY35D7Jkumy90DokH8934LtxYrVrImAehKPyFSoNoUaUnP0OR 16MzZ0Ajou8m3kiYirqD+9v5ufHGmxDILuP9Of+HLQ7jHH7Jfo62hP3Py6dAsPJ2gGt1B6aW3zK rJzPmWkCwrJ+FSSZBdJdzFEd0ZyV4IQvBG2x7udI7JXk2T6kVtkKGd9fneFtj8D8uapz65CUQ3M j7MY8vXMNLXsUNNHDWSbDweU1jgz2w/p/MYaigpI1YlJW0SI14izHWYSXaWfpw== X-Received: by 2002:a17:90b:8c6:b0:3b1:b66a:c05 with SMTP id 98e67ed59e1d1-3b1b66a0d23mr1977115a91.14.1794612500381; Fri, 13 Nov 2026 15:28:20 -0800 (PST) Return-Path: Received: from localhost.localdomain ([69.9.132.159]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b1bfb607e7sm1279789a91.3.2026.11.13.15.28.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Nov 2026 15:28:19 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: yocto-patches@lists.yoctoproject.org Cc: Tim Orling Subject: [layerindex-web][PATCH 2/4] requirements.txt: upgrade patch and minor releases Date: Fri, 13 Nov 2026 15:28:06 -0800 Message-ID: <20261113232808.96792-3-tim.orling@konsulko.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113232808.96792-1-tim.orling@konsulko.com> References: <20261113232808.96792-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 13 Nov 2026 23:28:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5341 Upgrade amqp, asgiref, billiard, celery, click, click-repl, djangorestframework, kombu, mysqlclient, pytz, sqlparse, tzdata and wcwidth to their latest releases. Celery 5.7 needs click-repl 0.4.1 and adds a dependency on tzlocal, so pin that too. AI-Generated: Claude Opus 5.5 Signed-off-by: Tim Orling --- requirements.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/requirements.txt b/requirements.txt index bfc3466..10e648c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ -i https://pkgs.safetycli.com/repository/self-d8782/project/layerindex-web/pypi/simple/ -amqp==5.3.1 -asgiref==3.12.1 +amqp==5.4.2 +asgiref==3.13.0 beautifulsoup4==4.15.0 -billiard==4.2.4 -celery==5.6.3 -click==8.4.2 +billiard==4.3.2 +celery==5.7.0 +click==8.5.1 click-didyoumean==0.3.1 click-plugins==1.1.1.2 -click-repl==0.3.0 +click-repl==0.4.1 confusable-homoglyphs==3.3.1 diff-match-patch==20241021 Django>=5.2.18,<5.3 @@ -20,23 +20,24 @@ django-registration==5.2.1 django-reversion==6.3.0 django-reversion-compare==0.17.0 django-simple-captcha==0.7.0 -djangorestframework==3.18.2 +djangorestframework==3.18.3 gitdb==4.0.12 GitPython==3.2.1 -kombu==5.6.2 -mysqlclient==2.2.8 +kombu==5.7.0 +mysqlclient==2.3.1 packaging_legacy==23.0.post0 Pillow==13.0.0 prompt-toolkit==3.0.53 pyasyncore==1.0.5 python-dateutil==2.9.0.post0 -pytz==2026.3.post1 +pytz==2026.6 six==1.17.0 smmap==5.0.3 soupsieve==4.1 -sqlparse==0.6.0 +sqlparse==0.6.1 typing_extensions==4.16.0 -tzdata==2026.3 +tzdata==2026.6 +tzlocal==5.4.5 vine==5.1.0 -wcwidth==0.8.2 +wcwidth==0.9.4 PyYAML==6.0.3 From patchwork Fri Nov 13 23:28:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 104014 X-Patchwork-Delegate: ticotimo@gmail.com Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1894.1794612503841577214 for ; Fri, 13 Nov 2026 15:28:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=KF7QWq61; spf=pass (domain: gmail.com, ip: 209.85.216.50, mailfrom: ticotimo@gmail.com) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-3b08a162d4bso800634a91.3 for ; Fri, 13 Nov 2026 15:28:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794612503; x=1795217303; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hWpY8ysClDJKuUZZH6Xd/IZG6FdZARbe1+6Y0vXefT4=; b=KF7QWq61Oznfl/6BblCkFo5mM87REm00xq22qnFZD+w9+fhX4whV3RAt8q8AxhhKFF a956CbgFZanrqzxsp6/lnAm8ca689T+wOcKfcfN4KSUnqHSasLY+YqVTeEn04MyzdW/Q 0nTm+3zGG2xLvEkcK5i3mJhZuhsNPyTorjp7EBu9MOE7OKYib1TxRqAqpCzvASt4G7C+ 1d8IEoeW8q1C8jahq0vmWbjtb2rEQoAb1FFyGS9fwJM+6/xFkR6jadPAjAHGTdvxz/TM 2DgBxS+krz7R7K8+fCSdubsB02p5nK2vyACsweIX25u/rVuMG0LkbQXwEXYKnksn7bBw gZew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794612503; x=1795217303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=hWpY8ysClDJKuUZZH6Xd/IZG6FdZARbe1+6Y0vXefT4=; b=JUDvSthZdcjLp9Q1qfg4EeCzlljUOGx4OUot0wn6KclgJWwtZy1Vt7rw6rVRfjy0ed /y8Ll/uY6pUBkA9nrNLrbguVZ6KlYDsm6hu4EicnpSFH8wBloO3I2CQH4uA6A1RRAe9+ /AYzD8v8tbWd1RDNGpl/ztBxPU/93fyEzb1CW+hAI9zQ0uWiPex1dKuPjeJv7J8XFILu KOSRlrgkZcw4zNEYwo2KMpUvdhTNn9RTrbXykOyR84q56xHjsTKejpGG08ObeQFo2mcB sDuyQjw1r59QqFKs91L8JVpNQOb5ic66nEfTxtMm/lPq9HrKeytOUJiV97bvU6MKkZEB 9aXA== X-Gm-Message-State: APuU4Z+IGAX4USffztXokpVVhcCbSozfmx7Aq5C0YusuK6kBNmHJNM08 L7KrGfQztSm1vCNIBY4YIQwakxRFmAgncOLLzLaV+Dk20tG2+jsDJZa/JDjhGg== X-Gm-Gg: AYBFou18MKW71KYHEqstAVryfZmEHqLZy0WPx0sbPK5nCqnHt8L+eh0c0p7vNhEFhxt 6iINF34s9Ips6kOAYQDF4kTLzCv2wnvDfUFgUC2/ZkSUbTOJ6Dl2+mdx9riFKuEjdtiyg9AHnFJ 5CWdTPZBNl41/tdufIFey7TSlmNaoPm5AHqrxwhight2Wo6zl1OqkWQjY5f7r+ihaVlUQcejIBr 7YGYWRWTIsywbwG040WDOm2DTd2aTdzU382GE8glcOqOHT1Da69/GqK2NTjrShsTkVwonGPRuC2 pGmnJPaNzlfixUkiYt21e7PTg4rMUo3jwMpNfvFJejPLHuTnRahwocHgcygDYp94tiJlr+MVVhv gHNU2NgzsJh6oQGNKa28dHixREMlZ0F8VDpJSbnYhC+CgUOddsNoaC5f1vUzsN8JNI76KXY6aoA c5/t3IoaCFNBB2wOVoxkGf7SALHFW2ATERKaGcj8QWsxFKgLqHritOVuK41hZ9kf6wnWOTrC0os f8YNsA3WwGBOGYLu9S88uGJT9qzotAVFnOywCFBSI3LswTox6OC5C7gnvwEXzjCuT2gbLWA5ArM xx5FtRLHVU77WI/9t09ScxGXZQDDAjP57h1CWbmU6yokK1X2k9Rwry5KbOHbfcBaB2T2BHFyeW1 odSwpK1Y= X-Received: by 2002:a17:90b:4c0c:b0:3a0:516d:9f87 with SMTP id 98e67ed59e1d1-3b1b0a1f01cmr4288419a91.13.1794612503105; Fri, 13 Nov 2026 15:28:23 -0800 (PST) Return-Path: Received: from localhost.localdomain ([69.9.132.159]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b1bfb607e7sm1279789a91.3.2026.11.13.15.28.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Nov 2026 15:28:21 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: yocto-patches@lists.yoctoproject.org Cc: Tim Orling Subject: [layerindex-web][PATCH 3/4] layerindex/utils.py: fix sanitise_html() for Python 3 and current bs4 Date: Fri, 13 Nov 2026 15:28:07 -0800 Message-ID: <20261113232808.96792-4-tim.orling@konsulko.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113232808.96792-1-tim.orling@konsulko.com> References: <20261113232808.96792-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 13 Nov 2026 23:28:32 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5342 Site notices showed a literal b'...', because sanitise_html() returned bytes, and a notice with an attribute on an allowed tag, such as

, failed to render, because current Beautiful Soup needs a dict for tag.attrs. Return a str, clear attributes with a dict, and move off the deprecated findAll() and renderContents(). Add tests. AI-Generated: Claude Opus 5.5 Signed-off-by: Tim Orling --- layerindex/utils.py | 6 +++--- tests/test_utils.py | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/layerindex/utils.py b/layerindex/utils.py index fd29de0..8e06463 100644 --- a/layerindex/utils.py +++ b/layerindex/utils.py @@ -544,13 +544,13 @@ def run_command_interruptible(cmd): def sanitise_html(html): soup = BeautifulSoup(html, "html.parser") - for tag in soup.findAll(True): + for tag in soup.find_all(True): if tag.name not in ['strong', 'em', 'b', 'i', 'p', 'ul', 'ol', 'li', 'br', 'p']: tag.hidden = True elif tag.attrs: - tag.attrs = [] + tag.attrs = {} - return soup.renderContents() + return soup.decode_contents() def squashspaces(string): return re.sub(r"\s+", " ", string).strip() diff --git a/tests/test_utils.py b/tests/test_utils.py index 95b5e04..248b562 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -85,3 +85,16 @@ def test_in_nested_layer(repo_with_nested_layers, path, expected): assert utils.in_nested_layer(path, nested, repodir) is expected # Absolute paths give the same answer assert utils.in_nested_layer(os.path.join(repodir, path), nested, repodir) is expected + + +@pytest.mark.parametrize('html, expected', [ + # Allowed tags are kept, but lose their attributes + ('

Hi there

', '

Hi there

'), + ('
  • one
', '
  • one
'), + # Other tags are dropped, but their text stays (escaped) + ('link', 'link'), + ('', 'alert(1)'), + ('
x <y>
', 'x <y>'), +]) +def test_sanitise_html(html, expected): + assert utils.sanitise_html(html) == expected From patchwork Fri Nov 13 23:28:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 104015 X-Patchwork-Delegate: ticotimo@gmail.com Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1895.1794612507500781188 for ; Fri, 13 Nov 2026 15:28:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=WUbuprJY; spf=pass (domain: gmail.com, ip: 209.85.215.171, mailfrom: ticotimo@gmail.com) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-cddc597d062so1290645a12.3 for ; Fri, 13 Nov 2026 15:28:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794612507; x=1795217307; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=PACwRzpR9Bs5dS2AbPTW6J7/q/A2iGukOTfcFZM6xh8=; b=WUbuprJY+CkDNqtcqEbBx/kOTwR0ux7TvOLhSZHXpU81qauRBPJYo6HlNLf1viRAKl I5Zgtdoufirk72Ksf97ztm9gbyob/tCz28t9W0UiJi4pfyQeIzOihCftfPnIljk/xob2 IwqImi4pYnjYKeaEtzbCeGgsloTzSJt2s+COg81MIj3JETUgu1GmjPBQt3u4zWgquO3m pToLA7l6GThGV94YfI4cyrjV51W6CbP0Sy7IYoct+jtRo5+4Wy0wq6EmXpUjI9Y3kwBV +5jr+QtCaKihq3ygrtk6URWZ8g89fNCXiXthx6f4RVDnmF4o4x2hQ8/tzLfEHZeF+L0K PKWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794612507; x=1795217307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=PACwRzpR9Bs5dS2AbPTW6J7/q/A2iGukOTfcFZM6xh8=; b=BSESI+0kjfoPe6Edcrx3cu2uLRFtIxic9yYszuKy6A2AZ8TyEsiBOJH8PoK6lYcnAq ROJKSHrWd18ayNMp80MlqzhZ3nF5wind4smk4gPu0+qFUiaekb9uBI2Jt/z04uAhfUc9 k+S77bmENqnxqE9uAphxPUYyUXO5LlcWYFp6QSPls6Hg130fmt4dwik+8JwgCp5onlgK 5SSygHVInYBk4PB+2rq+1qFtIx73gs3Gw19GJkFwyi+dJ8QRn8B8p4ouSrG4QtGLdLsi 340SIYtZ/gcw4JQBVeObkV/CE8eS9TJJ97zoYPVy6RoMX4nFHEkc5AXbzt6jYYb+wSCt ReFA== X-Gm-Message-State: APuU4Z+0bWXfNPc3DvmZOojHCPJOpP9WNgR8z8ZXtB5aUe/3gH9CmX/Z OZcv38nCAUtVvQ9xtRrwGaCNfhkdxPkt+Tl8KpQoRDeIv6BFMa131BxZ8z9kMw== X-Gm-Gg: AYBFou0wiOCw2MYyjR2Q9gyBSHpgzlUXh9eNnSumC/bucI1RLHuY9i404XfC7zJS28k 9kLHykhM3KG/059d3jR92F6rNbAT+Od4a8Qqibrihyot99XhiFgVIoQid2jtnB2FnQXLVqYen35 +kp1754O+vd6Sdh7d6CEy+XhvLIfAQhzmK9i8DvrgpM9htSsXkEAoQZOW0+uSKKt/ednbdgZgAA UNKVy+dksjQ24GLltVbd/E0aZDw3abKQqmER4rTXzxv7xzZ0lkixxEaYrJ2x7CGbz41jEdGrgY7 mN/MmNspOgla1q9BSrOvDLU9Mp2poHExuY+V08h5jvGh562dzQcwiU044O4b2XtTOd09TA+mEUN FA2Qhw0sWRawxSupxO5XUSu63yGZWsVBWR74u/gvenEAqImUPgCRhFYPjdPFZYRIynwe1v9f/8z kq0iJAox7OPw9W9zu9vHMsS2mO7eWU7TfMx5Fh/ZzMRCFHPZYsG7u18MVMo7avMdsb5wcst6boJ emPSuDk2PiUJjrxGa5dIeNlFx+ihaTkxDk6iOPT/OA982B9n3rtbK2F65oFsGJFHlTxmKa+AhZE 0few2YEXlLbxkFnzcJIjypAueO21dAispWzMLC2UQW4NqBV+39sTdMZMH4MM7g== X-Received: by 2002:a17:90b:548e:b0:3ac:9df3:6b07 with SMTP id 98e67ed59e1d1-3b1b0b8c31emr4018624a91.24.1794612506786; Fri, 13 Nov 2026 15:28:26 -0800 (PST) Return-Path: Received: from localhost.localdomain ([69.9.132.159]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b1bfb607e7sm1279789a91.3.2026.11.13.15.28.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Nov 2026 15:28:25 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: yocto-patches@lists.yoctoproject.org Cc: Tim Orling Subject: [layerindex-web][PATCH 4/4] tests: add tests for the Celery tasks Date: Fri, 13 Nov 2026 15:28:08 -0800 Message-ID: <20261113232808.96792-5-tim.orling@konsulko.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113232808.96792-1-tim.orling@konsulko.com> References: <20261113232808.96792-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 13 Nov 2026 23:28:32 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5343 Run send_email and run_update_command in-process, so that Celery upgrades are checked without a broker. AI-Generated: Claude Opus 5.5 Signed-off-by: Tim Orling --- tests/test_tasks.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/test_tasks.py diff --git a/tests/test_tasks.py b/tests/test_tasks.py new file mode 100644 index 0000000..d4cde76 --- /dev/null +++ b/tests/test_tasks.py @@ -0,0 +1,39 @@ +# layerindex-web - tests for the Celery tasks in layerindex/tasks.py +# +# The tasks run in-process with apply(), so no broker is needed. +# +# Licensed under the MIT license, see COPYING.MIT for details +# +# SPDX-License-Identifier: MIT + +from datetime import datetime + +import pytest + +from layerindex import tasks +from layerindex.models import Update + + +def test_send_email(mailoutbox): + result = tasks.send_email.apply(('Subject', 'Body', 'from@example.com', ['to@example.com'])) + assert result.successful() + assert len(mailoutbox) == 1 + msg = mailoutbox[0] + assert (msg.subject, msg.body, msg.from_email, msg.to) == ('Subject', 'Body', 'from@example.com', ['to@example.com']) + + +@pytest.mark.django_db +@pytest.mark.parametrize('command, retcode, log', [ + ('echo update %update% on %branch%', 0, 'update {id} on master'), + ('echo failed; exit 3', 3, 'failed'), +]) +def test_run_update_command(settings, tmp_path, command, retcode, log): + settings.TASK_LOG_DIR = str(tmp_path / 'logs') + update = Update.objects.create(started=datetime.now(), task_id='test-task') + result = tasks.run_update_command.apply(('master', command), task_id='test-task') + assert result.get()['retcode'] == retcode + update.refresh_from_db() + assert update.retcode == retcode + assert update.log == log.format(id=update.id) + assert update.finished is not None + assert (tmp_path / 'logs' / 'task_test-task.log').exists()