Skip to content

Commit db52048

Browse files
selvanairlstipakov
authored andcommitted
Excplicitly check that urls start with http:// or https://
This is slightly better than macthing only "http" Found by ZeroPath Reported by: Joshua Rogers <[email protected]> Signed-off-by: Selva Nair <[email protected]>
1 parent fff2048 commit db52048

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ md_final(md_ctx *ctx, BYTE *md)
745745
BOOL
746746
open_url(const wchar_t *url)
747747
{
748-
if (!url || !wcsbegins(url, L"http"))
748+
if (!url || (!wcsbegins(url, L"http://") && !wcsbegins(url, L"https://")))
749749
{
750750
return false;
751751
}

0 commit comments

Comments
 (0)