diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 15d870b10..f88f53c4c 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -674,7 +674,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 88e02993a..6fd5096f8 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -1192,7 +1192,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index 1c1797c48..814eda553 100644 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -1482,7 +1482,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 378f9892b..f51eedd97 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -1352,7 +1352,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); diff --git a/src/platforms/rcore_desktop_win32.c b/src/platforms/rcore_desktop_win32.c index efe1cb42d..00d5565e2 100644 --- a/src/platforms/rcore_desktop_win32.c +++ b/src/platforms/rcore_desktop_win32.c @@ -1258,7 +1258,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); diff --git a/src/platforms/rcore_template.c b/src/platforms/rcore_template.c index 24fd1ecab..216c49af8 100644 --- a/src/platforms/rcore_template.c +++ b/src/platforms/rcore_template.c @@ -363,7 +363,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); diff --git a/src/platforms/rcore_web_emscripten.c b/src/platforms/rcore_web_emscripten.c index a7052c206..ff10fabb3 100644 --- a/src/platforms/rcore_web_emscripten.c +++ b/src/platforms/rcore_web_emscripten.c @@ -979,7 +979,7 @@ void OpenURL(const char *url) // Filter characters: ' and " TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'\"] characters"); } - else if ((strncmp(url, "http://", 7) != 0) && (strncmp(protocol, "https://", 8) != 0)) + else if ((strncmp(url, "http://", 7) != 0) && (strncmp(url, "https://", 8) != 0)) { // Only allow URL starting with "http://" or "https://" protocols TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");