mirror of
https://github.com/curl/curl.git
synced 2026-04-14 23:51:42 +03:00
mdlinkcheck: reject URLs containing quotes
Those would be illegal anyway and would make the script misbehave Reported-by: Stanislav Fort Closes #18889
This commit is contained in:
parent
e214b14501
commit
71b5e02590
1 changed files with 4 additions and 0 deletions
|
|
@ -140,6 +140,10 @@ sub checkurl {
|
|||
print "check $url\n";
|
||||
my $curlcmd="curl -ILfsm10 --retry 2 --retry-delay 5 -A \"Mozilla/curl.se link-probe\"";
|
||||
$url =~ s/\+/%2B/g;
|
||||
if($url =~ /[\"\'\n]/) {
|
||||
print STDERR "Bad URL in markdown: %s\n", $url{$url};
|
||||
return 1; # fail
|
||||
}
|
||||
my @content = `$curlcmd \"$url\"`;
|
||||
if(!$content[0]) {
|
||||
print STDERR "FAIL\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue