urlapi: verify the last letter of a scheme when set explictly

A logic error made the function not check the last character, which thus
could make it accept invalid schemes.

Added test 1965 to verify

Reported-by: Otis Cui Lei

Closes #20893
This commit is contained in:
Daniel Stenberg 2026-03-11 22:36:24 +01:00
parent 5fc7d50cec
commit 11c14b5ca5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 103 additions and 2 deletions

View file

@ -239,7 +239,8 @@ test1916 test1917 test1918 test1919 test1920 \
\
test1933 test1934 test1935 test1936 test1937 test1938 test1939 test1940 \
test1941 test1942 test1943 test1944 test1945 test1946 test1947 test1948 \
test1955 test1956 test1957 test1958 test1959 test1960 test1964 \
test1955 test1956 test1957 test1958 test1959 test1960 test1964 test1965 \
\
test1970 test1971 test1972 test1973 test1974 test1975 test1976 test1977 \
test1978 test1979 test1980 test1981 \
\