-
Notifications
You must be signed in to change notification settings - Fork 5
Update index.php #6
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
base: php
Are you sure you want to change the base?
Conversation
Pridané tlačidlá na kopírovanie a inštaláciu doplnku priamo na úvodnej stránke
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 1 file
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="index.php">
<violation number="1" location="index.php:88">
Escape host-derived manifestUrl before embedding it into the JavaScript string to avoid Host-header-driven XSS.</violation>
<violation number="2" location="index.php:89">
Sanitize or encode the host value before inserting it into the JavaScript literal to prevent Host-header-based XSS.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
|
|
||
| <script> | ||
| const manifestUrl = "<?php echo $manifestUrl; ?>"; | ||
| const hostOnly = "<?php echo $host; ?>/manifest.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanitize or encode the host value before inserting it into the JavaScript literal to prevent Host-header-based XSS.
Prompt for AI agents
Address the following comment on index.php at line 89:
<comment>Sanitize or encode the host value before inserting it into the JavaScript literal to prevent Host-header-based XSS.</comment>
<file context>
@@ -14,9 +14,108 @@
+
+ <script>
+ const manifestUrl = "<?php echo $manifestUrl; ?>";
+ const hostOnly = "<?php echo $host; ?>/manifest.json";
-$_SERVER['REQUEST_URI'] = $uri;
</file context>
| const hostOnly = "<?php echo $host; ?>/manifest.json"; | |
| const hostOnly = <?php echo json_encode($host . '/manifest.json'); ?>; |
| <div id="copy-info">✅ Odkaz bol skopírovaný do schránky!</div> | ||
|
|
||
| <script> | ||
| const manifestUrl = "<?php echo $manifestUrl; ?>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escape host-derived manifestUrl before embedding it into the JavaScript string to avoid Host-header-driven XSS.
Prompt for AI agents
Address the following comment on index.php at line 88:
<comment>Escape host-derived manifestUrl before embedding it into the JavaScript string to avoid Host-header-driven XSS.</comment>
<file context>
@@ -14,9 +14,108 @@
+ <div id="copy-info">✅ Odkaz bol skopírovaný do schránky!</div>
+
+ <script>
+ const manifestUrl = "<?php echo $manifestUrl; ?>";
+ const hostOnly = "<?php echo $host; ?>/manifest.json";
</file context>
| const manifestUrl = "<?php echo $manifestUrl; ?>"; | |
| const manifestUrl = <?php echo json_encode($manifestUrl); ?>; |
Pridané tlačidlá na kopírovanie a inštaláciu doplnku priamo na úvodnej stránke
Summary by cubic
Adds a simple landing page at / that lets users copy the manifest URL and install the addon directly into Stremio. This replaces the redirect to /manifest.json and makes onboarding easier.
Written for commit 5a80a82. Summary will update automatically on new commits.