Skip to content

Commit 7dfbd04

Browse files
authored
Merge pull request #1 from openstore-ecommerce/feature/security-fix
Feature/security fix
2 parents 1858d65 + 141ab08 commit 7dfbd04

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

Components/AjaxProvider.cs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,22 @@ public override string ProcessCommand(string paramCmd, HttpContext context, stri
3232

3333
var strOut = "OS_Sips Ajax Error";
3434

35-
// NOTE: The paramCmd MUST start with the plugin ref. in lowercase. (links ajax provider to cmd)
36-
switch (paramCmd)
35+
if (PluginUtils.CheckPluginSecurity(PortalSettings.Current.PortalId, "sips1"))
3736
{
38-
case "sips1_savesettings":
39-
strOut = objCtrl.SavePluginSinglePageData(context);
40-
break;
41-
case "sips1_selectlang":
42-
objCtrl.SavePluginSinglePageData(context);
43-
var nextlang = ajaxInfo.GetXmlProperty("genxml/hidden/nextlang");
44-
var info = objCtrl.GetPluginSinglePageData("OS_Sipspayment", "OS_SipsPAYMENT", nextlang);
45-
strOut = NBrightBuyUtils.RazorTemplRender("settingsfields.cshtml", 0, "", info, "/DesktopModules/NBright/OS_Sips", "config", nextlang, StoreSettings.Current.Settings());
46-
break;
37+
// NOTE: The paramCmd MUST start with the plugin ref. in lowercase. (links ajax provider to cmd)
38+
switch (paramCmd)
39+
{
40+
case "sips1_savesettings":
41+
strOut = objCtrl.SavePluginSinglePageData(context);
42+
break;
43+
case "sips1_selectlang":
44+
objCtrl.SavePluginSinglePageData(context);
45+
var nextlang = ajaxInfo.GetXmlProperty("genxml/hidden/nextlang");
46+
var info = objCtrl.GetPluginSinglePageData("OS_Sipspayment", "OS_SipsPAYMENT", nextlang);
47+
strOut = NBrightBuyUtils.RazorTemplRender("settingsfields.cshtml", 0, "", info, "/DesktopModules/NBright/OS_Sips", "config", nextlang,
48+
StoreSettings.Current.Settings());
49+
break;
50+
}
4751
}
4852

4953
return strOut;
73.9 KB
Binary file not shown.

OS_Sips.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>OS_Sips</RootNamespace>
1212
<AssemblyName>OS_Sips</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<TargetFrameworkProfile />
1616
<NuGetPackageImportStamp>

OS_Sips.dnn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="OS_Sips" type="Module" version="1.0.1">
3+
<package name="OS_Sips" type="Module" version="1.0.2">
44
<friendlyName>OS_Sips</friendlyName>
55
<description>OS_Sips: Payment provider for Open-Store</description>
66
<iconFile />

0 commit comments

Comments
 (0)