aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/config.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-20 22:11:59 +0900
committernsfisis <nsfisis@gmail.com>2026-06-20 22:25:15 +0900
commit8538a375a4ddcfad3fabc8d19ca41c148136b63b (patch)
treee5b93b856be1ae8cddb4973484f94d03731c246e /crates/shirabe/src/config.rs
parent6a5484cbf8e75c99098e5fba98a1c5e4c1b7c2f2 (diff)
downloadphp-shirabe-8538a375a4ddcfad3fabc8d19ca41c148136b63b.tar.gz
php-shirabe-8538a375a4ddcfad3fabc8d19ca41c148136b63b.tar.zst
php-shirabe-8538a375a4ddcfad3fabc8d19ca41c148136b63b.zip
feat(php-shim): implement parse_url and filter_var URL/boolean filters
Back parse_url/parse_url_all with reqwest::Url and add the FILTER_VALIDATE_URL and FILTER_VALIDATE_BOOLEAN arms to filter_var, so Config::prohibit_url_by_config no longer hits todo!(). reqwest::Url is not a byte-for-byte port of PHP's parser; the divergences are noted with TODO(phase-c). Switch the scheme in_array in prohibit_url_by_config to strict: the needle is a string-or-null and the haystack holds only non-numeric string literals, so loose and strict comparison are provably equivalent here, avoiding a dependency on PHP loose `==` semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/config.rs')
-rw-r--r--crates/shirabe/src/config.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe/src/config.rs b/crates/shirabe/src/config.rs
index 7c6d477..2c39db5 100644
--- a/crates/shirabe/src/config.rs
+++ b/crates/shirabe/src/config.rs
@@ -1123,7 +1123,7 @@ impl Config {
PhpMixed::String("ftp".to_string()),
PhpMixed::String("svn".to_string()),
]),
- false,
+ true,
) {
if self.get_with_flags("secure-http", 0)?.as_bool() == Some(true) {
if scheme.as_deref() == Some("svn") {