Skip to content

Commit 92b4f23

Browse files
author
Trevor Spink
committed
Additional Security Fixes
1 parent 67d1eb7 commit 92b4f23

File tree

8 files changed

+33
-9
lines changed

8 files changed

+33
-9
lines changed

.vs/ProteanCMS/v16/.suo

0 Bytes
Binary file not shown.

Assemblies/ProteanCMS/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ Imports System.Runtime.InteropServices
3333
' You can specify all the values or you can default the Build and Revision Numbers
3434
' by using the '*' as shown below:
3535

36-
<Assembly: AssemblyVersion("6.0.38.66")>
36+
<Assembly: AssemblyVersion("6.0.38.69")>
3737
<Assembly: AssemblyDelaySign(False)>
3838
<Assembly: AssemblyKeyFile("../../../eonic.snk")>
3939
<Assembly: AssemblyKeyName("")>
4040

41-
<Assembly: AssemblyFileVersion("6.0.38.66")>
41+
<Assembly: AssemblyFileVersion("6.0.38.69")>
4242
<Assembly: NeutralResourcesLanguageAttribute("en")>
4343

Assemblies/ProteanCMS/CMS/Cart/Cart.vb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,11 +2584,10 @@ processFlow:
25842584
CheckQuantities(oCartElmt, oRow("productDetail") & "", CLng("0" & oRow("quantity")))
25852585
End If
25862586

2587-
weight = weight + (oRow("weight") * oRow("quantity"))
2588-
quant = quant + oRow("quantity")
2587+
weight += (oRow("weight") * oRow("quantity"))
2588+
quant += oRow("quantity")
25892589

2590-
'total = total + (oRow("quantity") * Round(oRow("price") + nOpPrices, , , mbRoundup))
2591-
total += Round((oRow("price") * oRow("quantity")) + nOpPrices, , , mbRoundup)
2590+
total += (oRow("quantity") * Round(oRow("price") + nOpPrices, , , mbRoundup))
25922591
'we do this later after we have applied discounts
25932592

25942593
'Round( Price * Vat ) * Quantity

Assemblies/ProteanCMS/CMS/Membership/Membership.vb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,15 @@ Partial Public Class Cms
766766
Case "md5salt", "md5", "sha1", "sha256"
767767
If myWeb.moRequest("ewCmd") = "AR-MOD" Then
768768
Dim cAccountHash As String = myWeb.moRequest("AI")
769+
'Validate to prevent SQL injection
770+
'strip out any spaces to prevent SQL injection
771+
If cAccountHash.Contains(" ") Then
772+
cAccountHash = Left(cAccountHash, InStr(cAccountHash, " "))
773+
End If
774+
If cAccountHash.Contains("%20") Then
775+
cAccountHash = Left(cAccountHash, InStr(cAccountHash, "%20"))
776+
End If
777+
769778
If Not cAccountHash = "" Then
770779
oXfmElmt = adXfm.xFrmConfirmPassword(cAccountHash)
771780
Else

Assemblies/ProteanCMS/ProteanCMS.vbproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
</NuGetPackageImportStamp>
7575
<ShouldCreateLogs>False</ShouldCreateLogs>
7676
<AdvancedSettingsExpanded>True</AdvancedSettingsExpanded>
77-
<AssemblyVersion>6.0.38.66</AssemblyVersion>
77+
<AssemblyVersion>6.0.38.69</AssemblyVersion>
7878
<UpdatePackageVersion>False</UpdatePackageVersion>
7979
<AssemblyInfoVersionType>SettingsVersion</AssemblyInfoVersionType>
8080
<InheritWinAppVersionFrom>None</InheritWinAppVersionFrom>

Assemblies/ProteanCMS/Providers/Membership.BaseProvider.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,9 @@ Check:
632632
Public Function xFrmConfirmPassword(ByVal AccountHash As String) As XmlElement
633633
Try
634634
Dim oMembership As New Protean.Cms.Membership(myWeb)
635-
Dim nUserId As Integer = oMembership.DecryptResetLink(goRequest("id"), AccountHash)
635+
Dim SubmittedUserId As Integer = CInt("0" + goRequest("id"))
636+
637+
Dim nUserId As Integer = oMembership.DecryptResetLink(SubmittedUserId, AccountHash)
636638

637639
Return xFrmConfirmPassword(nUserId)
638640

Assemblies/ProteanCMS/Services.vb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ Public Class Services
6060
Function CheckUserIP() As Boolean
6161
Try
6262
Dim moConfig As System.Collections.Specialized.NameValueCollection = WebConfigurationManager.GetWebApplicationSection("protean/web")
63-
Dim SoapIps As String = moConfig("SoapIps") & ",127.0.0.1,::1,"
63+
Dim SoapIps As String = moConfig("SoapIps")
64+
65+
If LCase(moConfig("Debug")) = "on" Then
66+
SoapIps = +",127.0.0.1,::1,"
67+
End If
68+
6469
Dim cIP As String = GetIpAddress(moRequest)
6570
If SoapIps.Contains(cIP & ",") Then
6671
Return True
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Content type="xform" name="ResetAccount"><model><instance><user><email></email></user></instance>
3+
<submission id="ResetAccount" action="" method="post" event="form_check(this)" />
4+
<bind id="cEmail" nodeset="user/email" required="true()" type="format:^[a-zA-Z0-9._%+-@ ]*$" />
5+
</model><group ref="ResetAccount"><label>
6+
<span class="msg-028">Please enter your email address and we will email you with your password.</span></label>
7+
<input bind="cEmail"><label>Email address / Username</label><value></value></input>
8+
<submit submission="" ref="ewAccountReset" class="principle"><label>Send Password</label></submit></group>
9+
</Content>

0 commit comments

Comments
 (0)