- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Mon, 17 Jul 2023 20:35:39 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 18 July 2023 03:35:45 UTC
@yoshisatoyanagisawa commented on this pull request.
> + <section algorithm>
+ <h3 id="verify-router-rule-algorithm"><dfn>VerifyRouterRule</dfn></h3>
+
+ : Input
+ :: |rule|, a {{RouterRule}}
+ : Output
+ :: a boolean
+
+ 1. If |rule|["{{RouterRule/condition}}"]["{{RouterCondition/urlPattern}}"] is the empty string, return false.
+ 1. Let |urlPattern| be a result of [=urlpattern/parsing=] |rule|["{{RouterRule/condition}}"]["{{RouterCondition/urlPattern}}"]. If a <code>TypeError</code> is thrown, return false.
+ 1. [=list/For each=] |part| of |urlPattern|:
+ 1. If |part|'s [=urlpattern-part/type=] is "regexp", return false.
+
+ Note: Since running a user-defined regular expression has a security concern, it is prohibited.
+
+ 1. Set |urlPattern| to |rule|["{{RouterRule/condition}}"]["{{RouterCondition/urlPattern}}"]'s associated [=hostname component=].
The order of variables looks wrong. Let me fix it.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1686#discussion_r1266157213
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1686/review/1534088993@github.com>
Received on Tuesday, 18 July 2023 03:35:45 UTC