Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging master to test #587

Open
wants to merge 1,909 commits into
base: test
Choose a base branch
from
Open

Merging master to test #587

wants to merge 1,909 commits into from

Conversation

HarikaMunipalle
Copy link
Contributor

No description provided.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

if (!newSrc.includes("autoplay=1")) {
newSrc = newSrc.includes("?") ? `${newSrc}&autoplay=1` : `${newSrc}?autoplay=1`;
}
mainVideo.setAttribute("src", newSrc);

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.

Copilot Autofix

AI about 2 months ago

To fix the problem, we need to ensure that the newSrc value is properly sanitized before being used as the src attribute of the mainVideo element. One way to achieve this is by using a URL parser to validate and sanitize the URL. This will help prevent any malicious content from being executed.

We will:

  1. Parse the newSrc value using the URL constructor to ensure it is a valid URL.
  2. Extract and modify the query parameters as needed.
  3. Set the sanitized URL as the src attribute of the mainVideo element.
Suggested changeset 1
assets/js/m3.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/assets/js/m3.js b/assets/js/m3.js
--- a/assets/js/m3.js
+++ b/assets/js/m3.js
@@ -57,7 +57,11 @@
             let newSrc = this.getAttribute("data-video-src");
-            
-            if (!newSrc.includes("autoplay=1")) {
-                newSrc = newSrc.includes("?") ? `${newSrc}&autoplay=1` : `${newSrc}?autoplay=1`;
+            try {
+                let url = new URL(newSrc, window.location.origin);
+                if (!url.searchParams.has("autoplay")) {
+                    url.searchParams.append("autoplay", "1");
+                }
+                mainVideo.setAttribute("src", url.toString());
+            } catch (e) {
+                console.error("Invalid video URL:", newSrc);
             }
-            mainVideo.setAttribute("src", newSrc);
             let figcaption = this.parentElement.querySelector("figcaption");
EOF
@@ -57,7 +57,11 @@
let newSrc = this.getAttribute("data-video-src");

if (!newSrc.includes("autoplay=1")) {
newSrc = newSrc.includes("?") ? `${newSrc}&autoplay=1` : `${newSrc}?autoplay=1`;
try {
let url = new URL(newSrc, window.location.origin);
if (!url.searchParams.has("autoplay")) {
url.searchParams.append("autoplay", "1");
}
mainVideo.setAttribute("src", url.toString());
} catch (e) {
console.error("Invalid video URL:", newSrc);
}
mainVideo.setAttribute("src", newSrc);
let figcaption = this.parentElement.querySelector("figcaption");
Copilot is powered by AI and may make mistakes. Always verify output.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
rwuhrmangsa and others added 30 commits March 18, 2025 08:18

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Ritm1312357

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Staging

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Qsmo filter fix ogpweb 17415

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Staging

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Ogpweb 17899 grm

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Staging

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Ogpweb 17840

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Staging

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants