Enhance security by adding rel="noopener" to external links

- Updated multiple HTML templates to include rel="noopener" on links that open in a new tab, improving security by preventing potential reverse tabnabbing attacks.
- This change affects various templates across the backup, base, file manager, mail server, and website functions sections.
This commit is contained in:
Master3395
2025-09-13 17:44:37 +02:00
parent f95566d3eb
commit 97fd4e055a
18 changed files with 42 additions and 40 deletions

View File

@@ -402,6 +402,7 @@
<div class="header-actions">
<a href="https://cyberpanel.net/KnowledgeBase/home/schedule-backups-local-or-sftp/"
target="_blank"
rel="noopener"
class="btn-secondary">
<i class="fas fa-book"></i>
{% trans "Remote Backups Guide" %}

View File

@@ -435,6 +435,7 @@
<div class="header-actions">
<a href="https://cyberpanel.net/docs/backup-to-google-drive/"
target="_blank"
rel="noopener"
class="btn-secondary">
<i class="fas fa-book"></i>
{% trans "Documentation" %}
@@ -518,7 +519,7 @@
<i class="fas fa-info-circle"></i>
<p>
{% trans "Backup retention is a" %}
<a href="https://cyberpanel.net/cyberpanel-addons" target="_blank">{% trans "paid feature" %}</a>.
<a href="https://cyberpanel.net/cyberpanel-addons" target="_blank" rel="noopener">{% trans "paid feature" %}</a>.
{% trans "Upgrade to manage how long backups are stored." %}
</p>
</div>

View File

@@ -173,7 +173,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="uploadBoxLabel" class="modal-header">
<h5 class="modal-title" >{% trans "Upload File" %} - <a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<h5 class="modal-title" >{% trans "Upload File" %} - <a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

View File

@@ -587,7 +587,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="uploadBoxLabel" class="modal-header">
<h5 class="modal-title">{% trans "Upload File" %} - <a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<h5 class="modal-title">{% trans "Upload File" %} - <a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

View File

@@ -620,7 +620,7 @@
</ul>
</div>
<a href="{$ addonInfo.addon_url $}" target="_blank" class="btn-primary" style="padding: 12px 30px; font-size: 16px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none;">
<a href="{$ addonInfo.addon_url $}" target="_blank" rel="noopener" class="btn-primary" style="padding: 12px 30px; font-size: 16px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none;">
<i class="fas fa-unlock"></i>
Unlock SSH Security Analysis
</a>

View File

@@ -964,15 +964,15 @@
</div>
<div id="header-right">
<div class="info-text">Connect with us — Watch tutorials, <a href="https://community.cyberpanel.net/" target="_blank" style="color: inherit; text-decoration: underline;">Join discussions</a>, and <a href="https://platform.cyberpersons.com/" target="_blank" style="color: inherit; text-decoration: underline;">get support</a>.</div>
<div class="info-text">Connect with us — Watch tutorials, <a href="https://community.cyberpanel.net/" target="_blank" rel="noopener" style="color: inherit; text-decoration: underline;">Join discussions</a>, and <a href="https://platform.cyberpersons.com/" target="_blank" rel="noopener" style="color: inherit; text-decoration: underline;">get support</a>.</div>
<div class="social-links">
<a href="https://web.facebook.com/groups/cyberpanel" target="_blank" title="Facebook">
<a href="https://web.facebook.com/groups/cyberpanel" target="_blank" rel="noopener" title="Facebook">
<i class="fab fa-facebook-f"></i>
</a>
<a href="https://www.youtube.com/@Cyber-Panel" target="_blank" title="YouTube">
<a href="https://www.youtube.com/@Cyber-Panel" target="_blank" rel="noopener" title="YouTube">
<i class="fab fa-youtube"></i>
</a>
<a href="https://x.com/CyberPanel" target="_blank" title="X (Twitter)">
<a href="https://x.com/CyberPanel" target="_blank" rel="noopener" title="X (Twitter)">
<i class="fab fa-twitter"></i>
</a>
</div>
@@ -1040,13 +1040,13 @@
<span>Design</span>
</a>
{% endif %}
<a href="https://platform.cyberpersons.com/" class="menu-item" target="_blank">
<a href="https://platform.cyberpersons.com/" class="menu-item" target="_blank" rel="noopener">
<div class="icon-wrapper">
<i class="fas fa-link"></i>
</div>
<span>Connect</span>
</a>
<a href="https://cyberpanel.net/KnowledgeBase/" class="menu-item" target="_blank">
<a href="https://cyberpanel.net/KnowledgeBase/" class="menu-item" target="_blank" rel="noopener">
<div class="icon-wrapper">
<i class="fas fa-comments"></i>
</div>
@@ -1243,7 +1243,7 @@
</a>
{% endif %}
{% if admin or createDatabase %}
<a href="{% url 'phpMyAdmin' %}" class="menu-item" target="_blank">
<a href="{% url 'phpMyAdmin' %}" class="menu-item" target="_blank" rel="noopener">
<span>PHPMYAdmin</span>
</a>
{% endif %}
@@ -1338,7 +1338,7 @@
</a>
{% endif %}
{% if admin or createEmail %}
<a href="/snappymail/index.php" class="menu-item" target="_blank">
<a href="/snappymail/index.php" class="menu-item" target="_blank" rel="noopener">
<span>Access Webmail</span>
</a>
{% endif %}

View File

@@ -423,7 +423,7 @@
{% trans "Initial Configurations" %}
</h1>
<p>{% trans "Configure Hostname and other default Settings for CyberPanel" %}</p>
<a href="https://cyberpanel.net/KnowledgeBase/home/onboarding-and-initial-cyberpanel-configurations/" target="_blank" class="learn-more-btn">
<a href="https://cyberpanel.net/KnowledgeBase/home/onboarding-and-initial-cyberpanel-configurations/" target="_blank" rel="noopener" class="learn-more-btn">
<i class="fas fa-book"></i>
{% trans "Learn More" %}
</a>

View File

@@ -183,7 +183,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="uploadBoxLabel" class="modal-header">
<h5 class="modal-title" >{% trans "Upload File" %} - <a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<h5 class="modal-title" >{% trans "Upload File" %} - <a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

View File

@@ -561,7 +561,7 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="uploadBoxLabel" class="modal-header">
<h5 class="modal-title">{% trans "Upload File" %} - <a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<h5 class="modal-title">{% trans "Upload File" %} - <a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/website-file-manager/" title="">{% trans "Upload Limits" %}</a></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

View File

@@ -560,7 +560,7 @@
<i class="fas fa-plus-circle"></i>
{% trans "Create Email" %}
</a>
<a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/email-debugger-cyberpanel/" class="btn-secondary">
<a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/email-debugger-cyberpanel/" class="btn-secondary">
<i class="fas fa-bug"></i>
{% trans "Debug Email Issues" %}
</a>
@@ -610,7 +610,7 @@
<i class="fas fa-exclamation-triangle"></i>
<div>
<p style="margin: 0;">{% trans "SSL for email is not configured properly. You may get self-signed errors in mail clients like Outlook and Thunderbird." %}</p>
<a href="https://community.cyberpanel.net/t/6-self-signed-ssl-error-on-outlook-thunderbird/207" target="_blank" style="color: var(--danger-text, #991b1b); text-decoration: underline;">{% trans "Learn more" %}</a>
<a href="https://community.cyberpanel.net/t/6-self-signed-ssl-error-on-outlook-thunderbird/207" target="_blank" rel="noopener" style="color: var(--danger-text, #991b1b); text-decoration: underline;">{% trans "Learn more" %}</a>
</div>
</div>
<button ng-hide="mailConfigured==1" ng-click='fixMailSSL()' class="btn-primary mb-4">

View File

@@ -402,7 +402,7 @@ ls -la /usr/local/CyberCP/testPlugin</code></pre>
</div>
<blockquote>
<strong>Source:</strong> This guide is based on the official CyberPanel documentation and the <a href="https://github.com/usmannasir/beautiful_names" target="_blank">beautiful_names plugin repository</a>.
<strong>Source:</strong> This guide is based on the official CyberPanel documentation and the <a href="https://github.com/usmannasir/beautiful_names" target="_blank" rel="noopener">beautiful_names plugin repository</a>.
</blockquote>
<h2>Prerequisites</h2>
@@ -476,7 +476,7 @@ urlpatterns = [
<h2>Step 3: Responding to Events</h2>
<p>To plug into events fired by CyberPanel core, you can respond to various events happening in the core. Visit the <a href="http://cyberpanel.net/docs/2-list-of-signals-events-files/" target="_blank">signal file documentation</a> for a complete list of events.</p>
<p>To plug into events fired by CyberPanel core, you can respond to various events happening in the core. Visit the <a href="http://cyberpanel.net/docs/2-list-of-signals-events-files/" target="_blank" rel="noopener">signal file documentation</a> for a complete list of events.</p>
<h3>Example Events</h3>
<ul>
@@ -518,7 +518,7 @@ python pluginInstaller.py install --pluginName examplePlugin</code></pre>
python pluginInstaller.py remove --pluginName examplePlugin</code></pre>
<h2>Beautiful Names Plugin Example</h2>
<p>CyberPanel has released an official plugin called <a href="https://github.com/usmannasir/beautiful_names" target="_blank">Beautiful Names</a> that removes the <code>admin_</code> prefix from Package and FTP account names. This plugin serves as a great example of how to create CyberPanel plugins.</p>
<p>CyberPanel has released an official plugin called <a href="https://github.com/usmannasir/beautiful_names" target="_blank" rel="noopener">Beautiful Names</a> that removes the <code>admin_</code> prefix from Package and FTP account names. This plugin serves as a great example of how to create CyberPanel plugins.</p>
<h3>Installation of Beautiful Names</h3>
<pre><code>cd /usr/local/CyberCP/pluginInstaller
@@ -535,9 +535,9 @@ python pluginInstaller.py remove --pluginName beautifulNames</code></pre>
<h2>Additional Resources</h2>
<ul>
<li><a href="http://cyberpanel.net/docs/2-list-of-signals-events-files/" target="_blank">Complete List of Signals and Events</a></li>
<li><a href="https://github.com/usmannasir/beautiful_names" target="_blank">Beautiful Names Plugin Repository</a></li>
<li><a href="https://github.com/usmannasir/cyberpanel" target="_blank">CyberPanel GitHub Repository</a></li>
<li><a href="http://cyberpanel.net/docs/2-list-of-signals-events-files/" target="_blank" rel="noopener">Complete List of Signals and Events</a></li>
<li><a href="https://github.com/usmannasir/beautiful_names" target="_blank" rel="noopener">Beautiful Names Plugin Repository</a></li>
<li><a href="https://github.com/usmannasir/cyberpanel" target="_blank" rel="noopener">CyberPanel GitHub Repository</a></li>
</ul>
<blockquote>

View File

@@ -4906,7 +4906,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
var FinalMarkup = '<tr>';
FinalMarkup += '<td><a href="/websites/WPHome?ID=' + value.id + '">' + value.name + '</a></td>';
FinalMarkup += '<td><a href="' + stagingUrl + '" target="_blank">' + stagingUrl + '</a></td>';
FinalMarkup += '<td><a href="' + stagingUrl + '" target="_blank" rel="noopener">' + stagingUrl + '</a></td>';
FinalMarkup += '<td>' + createdDate + '</td>';
FinalMarkup += '<td>';
FinalMarkup += '<button class="btn btn-sm btn-primary" onclick="DeployToProductionInitial(' + value.id + ')" data-toggle="modal" data-target="#DeployToProduction"><i class="fas fa-sync"></i> Sync to Production</button> ';
@@ -8658,7 +8658,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
var FinalMarkup = '<tr>';
FinalMarkup += '<td><a href="/websites/WPHome?ID=' + value.id + '">' + value.name + '</a></td>';
FinalMarkup += '<td><a href="' + stagingUrl + '" target="_blank">' + stagingUrl + '</a></td>';
FinalMarkup += '<td><a href="' + stagingUrl + '" target="_blank" rel="noopener">' + stagingUrl + '</a></td>';
FinalMarkup += '<td>' + createdDate + '</td>';
FinalMarkup += '<td>';
FinalMarkup += '<button class="btn btn-sm btn-primary" onclick="DeployToProductionInitial(' + value.id + ')" data-toggle="modal" data-target="#DeployToProduction"><i class="fas fa-sync"></i> Sync to Production</button> ';

View File

@@ -617,18 +617,18 @@
<div class="domain-card">
<div class="domain-header">
<div class="domain-info">
<a href="http://{$ web.domain $}" target="_blank" class="domain-name">
<a href="http://{$ web.domain $}" target="_blank" rel="noopener" class="domain-name">
{$ web.domain $}
</a>
<div class="master-domain">
<i class="fas fa-folder"></i>
Master Domain: {$ web.masterDomain $} •
<a target="_blank" href="/filemanager/{$ web.masterDomain $}">
<a target="_blank" rel="noopener" href="/filemanager/{$ web.masterDomain $}">
<i class="fas fa-folder-open"></i> File Manager
</a>
</div>
</div>
<a href="/websites/{$ web.masterDomain $}/{$ web.domain $}" target="_blank"
<a href="/websites/{$ web.masterDomain $}/{$ web.domain $}" target="_blank" rel="noopener"
class="manage-btn">
<i class="fas fa-cog"></i>
{% trans "Manage" %}

View File

@@ -494,7 +494,7 @@
<h2>
<i class="fas fa-clock" style="margin-right: 10px;"></i>
{% trans "Cron Management" %}
<a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/cron-jobs/" class="btn btn-link">
<a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/cron-jobs/" class="btn btn-link">
<i class="fas fa-book"></i>
{% trans "Cron Docs" %}
</a>

View File

@@ -753,7 +753,7 @@
class="website-screenshot"
onerror="this.onerror=null; this.src='{% static 'baseTemplate/assets/image-resources/webPanel.png' %}';">
<div class="screenshot-actions">
<a href="http://{$ web.domain $}" target="_blank" class="btn btn-outline btn-sm">
<a href="http://{$ web.domain $}" target="_blank" rel="noopener" class="btn btn-outline btn-sm">
Visit Site
</a>
<a ng-click="issueSSL(web.domain)" href="javascript:void(0);" class="btn btn-primary btn-sm">
@@ -817,7 +817,7 @@
<a href="javascript:void(0);" ng-click="visitSite(wp)" class="btn btn-outline btn-sm wp-action-btn">
Visit Site
</a>
<a href="{% url 'AutoLogin' %}?id={$ wp.id $}" target="_blank" class="btn btn-primary btn-sm wp-action-btn">
<a href="{% url 'AutoLogin' %}?id={$ wp.id $}" target="_blank" rel="noopener" class="btn btn-primary btn-sm wp-action-btn">
WP Admin
</a>
</div>

View File

@@ -560,7 +560,7 @@
<h2>
<i class="fab fa-git-alt" style="margin-right: 10px;"></i>
{% trans "Manage GIT" %}
<a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/website-management/" class="btn btn-link">
<a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/website-management/" class="btn btn-link">
<i class="fas fa-book"></i>
{% trans "Git Docs" %}
</a>

View File

@@ -529,7 +529,7 @@
<div>
<strong>{% trans "Notice:" %}</strong> {% trans "You are accessing CyberPanel via an IP address." %}<br>
{% trans "The Web Terminal will not work when accessed via IP. Please issue a hostname SSL and access the panel using your hostname (with valid SSL) to enable the terminal." %}<br>
<a href="{{ ssl_issue_link }}" target="_blank" class="btn btn-warning" style="margin-top:10px;">
<a href="{{ ssl_issue_link }}" target="_blank" rel="noopener" class="btn btn-warning" style="margin-top:10px;">
<i class="fas fa-lock"></i>
{% trans "Issue Hostname SSL" %}
</a>
@@ -543,7 +543,7 @@
<div>
<strong>{% trans "Warning:" %}</strong> {% trans "Your server is using a self-signed SSL certificate for the web terminal." %}<br>
{% trans "For security and browser compatibility, please issue a valid hostname SSL certificate." %}<br>
<a href="{{ ssl_issue_link }}" target="_blank" class="btn btn-warning" style="margin-top:10px;">
<a href="{{ ssl_issue_link }}" target="_blank" rel="noopener" class="btn btn-warning" style="margin-top:10px;">
<i class="fas fa-lock"></i>
{% trans "Issue SSL Now" %}
</a>
@@ -556,7 +556,7 @@
{% trans "SSH Configuration" %}
<img ng-hide="wpInstallLoading" src="{% static 'images/loading.gif' %}" style="display: none;" id="wpInstallLoading">
</h3>
<a target="_blank" href="https://cyberpanel.net/KnowledgeBase/home/ssh-manager-cyberpanel/" class="btn btn-link">
<a target="_blank" rel="noopener" href="https://cyberpanel.net/KnowledgeBase/home/ssh-manager-cyberpanel/" class="btn btn-link">
<i class="fas fa-book"></i>
{% trans "SFTP Docs" %}
</a>
@@ -671,7 +671,7 @@
<i class="fas fa-info-circle" style="font-size: 20px;"></i>
<div>
<strong>{% trans "This feature requires the CyberPanel Add-ons bundle." %}</strong><br>
<a href="https://cyberpanel.net/cyberpanel-addons" target="_blank" style="color: var(--primary-color); text-decoration: underline; font-weight: 600;">
<a href="https://cyberpanel.net/cyberpanel-addons" target="_blank" rel="noopener" style="color: var(--primary-color); text-decoration: underline; font-weight: 600;">
{% trans "Learn more & upgrade" %}
</a>
</div>

View File

@@ -1299,7 +1299,7 @@
{% trans "Manage your website with powerful tools and real-time monitoring" %}
</p>
<div class="hero-actions">
<a target="_blank" href="{$ previewUrl $}" class="hero-btn primary">
<a target="_blank" rel="noopener" href="{$ previewUrl $}" class="hero-btn primary">
<i class="fas fa-external-link-alt"></i>
{% trans "Preview Website" %}
</a>
@@ -1317,7 +1317,7 @@
<div class="alert alert-danger ssh-access-warning">
<strong>Notice:</strong> You are accessing CyberPanel via an <b>IP address</b>.<br>
The Web Terminal will not work when accessed via IP. Please issue a <b>hostname SSL</b> and access the panel using your hostname (with valid SSL) to enable the terminal.<br>
<a href="{{ ssl_issue_link }}" target="_blank" class="btn btn-warning" style="margin-top:10px;">Issue Hostname SSL</a>
<a href="{{ ssl_issue_link }}" target="_blank" rel="noopener" class="btn btn-warning" style="margin-top:10px;">Issue Hostname SSL</a>
</div>
{% endif %}
@@ -1341,13 +1341,13 @@
<div class="alert alert-warning" style="margin-bottom:18px;">
<strong>Warning:</strong> Your server is using a <b>self-signed SSL certificate</b> for the web terminal.<br>
For security and browser compatibility, please issue a valid hostname SSL certificate.<br>
<a href="{{ ssl_issue_link }}" target="_blank" class="btn btn-warning" style="margin-top:10px;">Issue SSL Now</a>
<a href="{{ ssl_issue_link }}" target="_blank" rel="noopener" class="btn btn-warning" style="margin-top:10px;">Issue SSL Now</a>
</div>
{% endif %}
{% if not has_addons %}
<div style="background: var(--warning-bg, #fff3cd); color: var(--warning-text, #856404); border: 1px solid var(--warning-border, #ffeeba); border-radius: 8px; padding: 18px; margin-bottom: 18px; text-align: center;">
<strong>This feature requires the CyberPanel Add-ons bundle.</strong><br>
<a href="https://cyberpanel.net/cyberpanel-addons" target="_blank" style="color: #2563eb; text-decoration: underline; font-weight: 600;">Learn more & upgrade</a>
<a href="https://cyberpanel.net/cyberpanel-addons" target="_blank" rel="noopener" style="color: #2563eb; text-decoration: underline; font-weight: 600;">Learn more & upgrade</a>
</div>
<div style="position: relative; width: 100%; height: 400px;">
<div id="xterm-container" style="width:100%;height:400px;background:var(--terminal-bg, #000);"></div>