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

Remove DNN Copyright Injection #3524

Merged
merged 4 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions DNN Platform/Website/Default.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,6 @@ private void InitializePage()
break;
}

//page comment
if (Host.DisplayCopyright)
{
Comment += string.Concat(Environment.NewLine,
"<!--*********************************************-->",
Environment.NewLine,
"<!-- DNN Platform - https://dnncommunity.org -->",
Environment.NewLine,
"<!-- Copyright (c) 2002-2019, by .NET Foundation -->",
Environment.NewLine,
"<!--*********************************************-->",
Environment.NewLine);
}

//Only insert the header control if a comment is needed
if(!String.IsNullOrWhiteSpace(Comment))
Page.Header.Controls.AddAt(0, new LiteralControl(Comment));
Expand Down Expand Up @@ -379,10 +365,6 @@ private void InitializePage()
{
KeyWords = PortalSettings.KeyWords;
}
if (Host.DisplayCopyright)
{
KeyWords += ",DotNetNuke,DNN";
}

//META copyright
if (!string.IsNullOrEmpty(PortalSettings.FooterText))
Expand All @@ -395,14 +377,9 @@ private void InitializePage()
}

//META generator
if (Host.DisplayCopyright)
{
Generator = "DotNetNuke ";
}
else
{
Generator = "";
}

Generator = "";


//META Robots - hide it inside popups and if PageHeadText of current tab already contains a robots meta tag
if (!UrlUtils.InPopUp() &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,25 +171,6 @@ class OtherSettingsPanelBody extends Component {
if (state.otherSettings) {
return (
<div className={styles.otherSettings}>
<InputGroup>
<div className="otherSettings-row_switch">
<Label
labelType="inline"
tooltipMessage={resx.get("plDisplayCopyright.Help")}
label={resx.get("plDisplayCopyright")}
extra={
<Tooltip
messages={[resx.get("GlobalSetting")]}
type="global"
style={{ float: "left", position: "static" }} />
} />
<Switch
onText={resx.get("SwitchOn")}
offText={resx.get("SwitchOff")}
value={state.otherSettings.DisplayCopyright}
onChange={this.onSettingChange.bind(this, "DisplayCopyright")} />
</div>
</InputGroup>
<InputGroup>
<div className="otherSettings-row_switch">
<Label
Expand All @@ -209,7 +190,7 @@ class OtherSettingsPanelBody extends Component {
onChange={this.onSettingChange.bind(this, "ShowCriticalErrors")} />
</div>
</InputGroup>
<InputGroup>
<InputGroup>
<div className="otherSettings-row_switch">
<Label
labelType="inline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,26 +204,6 @@ class PrivacySettingsPanelBody extends Component {
onChange={this.onSettingChange.bind(this, "CheckUpgrade")}
/>
</InputGroup>
<InputGroup>
<Label
labelType="inline"
tooltipMessage={resx.get("plDisplayCopyright.Help")}
label={resx.get("plDisplayCopyright")}
extra={
<Tooltip
messages={[resx.get("GlobalSetting")]}
type="global"
style={{ float: "left", position: "static" }}
/>
}
/>
<Switch
onText={resx.get("SwitchOn")}
offText={resx.get("SwitchOff")}
value={state.privacySettings.DisplayCopyright}
onChange={this.onSettingChange.bind(this, "DisplayCopyright")}
/>
</InputGroup>
</div>
) : (
<div key="column-one-left" className="left-column" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public class UpdatePrivacySettingsRequest

public bool DnnImprovementProgram { get; set; }

public bool DisplayCopyright { get; set; }

public bool DataConsentActive { get; set; }

public int DataConsentConsentRedirect { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Dnn.PersonaBar.Security.Services.Dto
{
public class UpdateOtherSettingsRequest
{
public bool DisplayCopyright { get; set; }

public bool ShowCriticalErrors { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ public HttpResponseMessage GetOtherSettings()
{
Settings = new
{
Host.DisplayCopyright,
Host.ShowCriticalErrors,
Host.DebugMode,
Host.RememberCheckbox,
Expand Down Expand Up @@ -784,7 +783,6 @@ public HttpResponseMessage UpdateOtherSettings(UpdateOtherSettingsRequest reques
{
try
{
HostController.Instance.Update("Copyright", request.DisplayCopyright ? "Y" : "N", false);
HostController.Instance.Update("ShowCriticalErrors", request.ShowCriticalErrors ? "Y" : "N", false);
HostController.Instance.Update("DebugMode", request.DebugMode ? "True" : "False", false);
HostController.Instance.Update("RememberCheckbox", request.RememberCheckbox ? "Y" : "N", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,6 @@ public HttpResponseMessage GetPrivacySettings(int? portalId)
portalSettings.CookieMoreLink,
CheckUpgrade = HostController.Instance.GetBoolean("CheckUpgrade", true),
DnnImprovementProgram = HostController.Instance.GetBoolean("DnnImprovementProgram", true),
DisplayCopyright = HostController.Instance.GetBoolean("Copyright", true),
portalSettings.DataConsentActive,
DataConsentResetTerms = false,
DataConsentConsentRedirect = TabSanitizer(portalSettings.DataConsentConsentRedirect, pid)?.TabID,
Expand Down Expand Up @@ -1612,7 +1611,6 @@ public HttpResponseMessage UpdatePrivacySettings(UpdatePrivacySettingsRequest re
PortalController.UpdatePortalSetting(pid, "CookieMoreLink", request.CookieMoreLink, false, request.CultureCode);
HostController.Instance.Update("CheckUpgrade", request.CheckUpgrade ? "Y" : "N", false);
HostController.Instance.Update("DnnImprovementProgram", request.DnnImprovementProgram ? "Y" : "N", false);
HostController.Instance.Update("Copyright", request.DisplayCopyright ? "Y" : "N", false);
PortalController.UpdatePortalSetting(pid, "DataConsentActive", request.DataConsentActive.ToString(), false);
PortalController.UpdatePortalSetting(pid, "DataConsentConsentRedirect", ValidateTabId(request.DataConsentConsentRedirect, pid).ToString(), false);
PortalController.UpdatePortalSetting(pid, "DataConsentUserDeleteAction", request.DataConsentUserDeleteAction.ToString(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1120,12 +1120,6 @@
<data name="CheckHiddenSystemFilesSuccess.Text" xml:space="preserve">
<value>There are no files marked as system file or hidden in the website folder.</value>
</data>
<data name="plDisplayCopyright.Help" xml:space="preserve">
<value>Check this box to add the DNN copyright credits to the page source.</value>
</data>
<data name="plDisplayCopyright.Text" xml:space="preserve">
<value>Show Copyright Credits</value>
</data>
<data name="CheckTelerikVulnerabilityFailure.Text" xml:space="preserve">
<value>The Telerik component vulnerability has not been patched, please go to http://www.dnnsoftware.com/community-blog/cid/155449/critical-security-update--september2017 for detailed information and to download the patch.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1362,12 +1362,6 @@
<data name="PrivacyCookieConsentSettings.Text" xml:space="preserve">
<value>Cookie Consent Settings</value>
</data>
<data name="plDisplayCopyright.Help" xml:space="preserve">
<value>Include DNN Platform Copyright statement in page HTML source. Users will not see this rendered in their browser.</value>
</data>
<data name="plDisplayCopyright.Text" xml:space="preserve">
<value>Display Copyright</value>
</data>
<data name="DataConsentActive.Help" xml:space="preserve">
<value>When switched on, registered users will be forced to consent to the terms and conditions of this site</value>
</data>
Expand Down