Skip to content

Commit 8d86105

Browse files
author
Marcel Schmidt
committed
Addition to #2190: Displays only vague error message on security relevant operation
1 parent 57c0eaf commit 8d86105

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Libraries/SmartStore.Data/Migrations/MigrationsConfiguration.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ public void MigrateLocaleResources(LocaleResourcesBuilder builder)
115115
"Geben Sie hier zusätzliche Pfade an, die als Allow-Einträge zur robots.txt hinzugefügt werden sollen. Jeder Eintrag muss in einer neuen Zeile erfolgen.");
116116

117117
builder.AddOrUpdate("Admin.Configuration.Settings.GeneralCommon.DisplayAllows", "Show items for 'Allow'", "Einträge für 'Allow' anzeigen");
118-
builder.AddOrUpdate("Admin.Configuration.Settings.GeneralCommon.DisplayDisallows", "Show items for 'Disallow'", "Einträge für 'Disallow' anzeigen");
119-
120-
builder.AddOrUpdate("Admin.Customers.CustomerRoles.OnlyAdminsAllowed",
121-
"You do not have administrator rights, therefore you are not allowed to modify administrators.",
122-
"Sie verfügen über keine Administratorenrechte, daher dürfen Sie Administratoren nicht modifzieren.");
118+
builder.AddOrUpdate("Admin.Configuration.Settings.GeneralCommon.DisplayDisallows", "Show items for 'Disallow'", "Einträge für 'Disallow' anzeigen");
123119
}
124120
}
125121
}

src/Presentation/SmartStore.Web/Administration/Controllers/CustomerController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public ActionResult Edit(CustomerModel model, bool continueEditing, FormCollecti
637637

638638
if (customer.IsAdmin() && !Services.WorkContext.CurrentCustomer.IsAdmin())
639639
{
640-
NotifyError(T("Admin.Customers.CustomerRoles.OnlyAdminsAllowed"));
640+
NotifyAccessDenied();
641641
return RedirectToAction("Edit", new { customer.Id });
642642
}
643643

@@ -916,7 +916,7 @@ public ActionResult Impersonate(int id)
916916
// Otherwise, that user can simply impersonate as an administrator and gain additional administrative privileges
917917
if (!Services.WorkContext.CurrentCustomer.IsAdmin() && customer.IsAdmin())
918918
{
919-
NotifyError(T("Admin.Customers.CustomerRoles.OnlyAdminsAllowed"));
919+
NotifyAccessDenied();
920920
return RedirectToAction("Edit", customer.Id);
921921
}
922922

0 commit comments

Comments
 (0)