diff --git a/.gitignore b/.gitignore index c6d3ba3b..33b178b1 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ build/*.nupkg /packages/* !packages/repositories.config OurUmbraco.Site/App_Data/YouTrack/all.json +OurUmbraco.Site/App_Data/communityblogs.xml diff --git a/OurUmbraco.Site/OurUmbraco.Site.csproj b/OurUmbraco.Site/OurUmbraco.Site.csproj index e78ab4b6..047b9a76 100644 --- a/OurUmbraco.Site/OurUmbraco.Site.csproj +++ b/OurUmbraco.Site/OurUmbraco.Site.csproj @@ -381,7 +381,9 @@ - + + Designer + diff --git a/OurUmbraco.Site/usercontrols/our.umbraco.org/Signup.ascx b/OurUmbraco.Site/usercontrols/our.umbraco.org/Signup.ascx index e636434c..a681dbda 100644 --- a/OurUmbraco.Site/usercontrols/our.umbraco.org/Signup.ascx +++ b/OurUmbraco.Site/usercontrols/our.umbraco.org/Signup.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Signup.ascx.cs" Inherits="our.usercontrols.Signup" %> - +<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

There is already an account with this e-mail address! You can login or reset your password.

@@ -10,7 +10,7 @@
Basic Information

- We just need the most basic information from you. + We just need the most basic information from you....

Name @@ -33,6 +33,7 @@

+
@@ -90,7 +91,14 @@
- +
+ Are you human? +

+ Please complete the following captcha + + Please type the text as it appears in the image(s) above. +

+
diff --git a/our.umbraco.org/app.config b/our.umbraco.org/app.config new file mode 100644 index 00000000..3292bf03 --- /dev/null +++ b/our.umbraco.org/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/our.umbraco.org/our.umbraco.org.csproj b/our.umbraco.org/our.umbraco.org.csproj index c544ae89..dd0ca849 100644 --- a/our.umbraco.org/our.umbraco.org.csproj +++ b/our.umbraco.org/our.umbraco.org.csproj @@ -22,6 +22,8 @@ + ..\ + true true @@ -70,6 +72,9 @@ ..\dependencies\4.9.1\Microsoft.ApplicationBlocks.Data.dll + + ..\packages\recaptcha.1.0.5.0\lib\.NetFramework 4.0\Recaptcha.dll + @@ -326,7 +331,10 @@ - + + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) @@ -345,4 +353,11 @@ XCOPY "$(ProjectDir)usercontrols\*.ascx" "$(ProjectDir)..\OurUmbraco.Site\usercontrols\our.umbraco.org" /y + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/our.umbraco.org/packages.config b/our.umbraco.org/packages.config new file mode 100644 index 00000000..24a88ff6 --- /dev/null +++ b/our.umbraco.org/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/our.umbraco.org/usercontrols/Signup.ascx b/our.umbraco.org/usercontrols/Signup.ascx index e636434c..960ee514 100644 --- a/our.umbraco.org/usercontrols/Signup.ascx +++ b/our.umbraco.org/usercontrols/Signup.ascx @@ -1,5 +1,5 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Signup.ascx.cs" Inherits="our.usercontrols.Signup" %> - +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Signup.ascx.cs" Inherits="our.usercontrols.Signup" %> +<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

There is already an account with this e-mail address! You can login or reset your password.

@@ -33,6 +33,7 @@

+
@@ -90,7 +91,14 @@
- +
+ Are you human? +

+ Please complete the following captcha + + Please type the text as it appears in the image(s) above. +

+
diff --git a/our.umbraco.org/usercontrols/Signup.ascx.cs b/our.umbraco.org/usercontrols/Signup.ascx.cs index d672f5eb..1fb1a24d 100644 --- a/our.umbraco.org/usercontrols/Signup.ascx.cs +++ b/our.umbraco.org/usercontrols/Signup.ascx.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Configuration; +using System.Drawing; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; @@ -25,6 +27,8 @@ namespace our.usercontrols //lazyloading the needed javascript for validation. (addded it to the master template as our ahah forms need it aswel) //umbraco.library.RegisterJavaScriptFile("jquery.validation", "/scripts/jquery.validation.js"); + recaptcha.PrivateKey = ConfigurationManager.AppSettings["RecaptchaPrivateKey"]; + MemberExists.Visible = false; if (!Page.IsPostBack && m != null) @@ -62,7 +66,17 @@ namespace our.usercontrols tb_location.Text = m.getProperty("location").Value.ToString(); } - + // ReCaptcha is wrong when Page.IsValid is false + Page.Validate(); + if (Page.IsPostBack && Page.IsValid == false) + { + tb_password.Attributes["value"] = tb_password.Text; + err_recaptcha.Visible = true; + } + else + { + err_recaptcha.Visible = false; + } } protected void createMember(object sender, EventArgs e) @@ -109,7 +123,7 @@ namespace our.usercontrols } else { - if (tb_email.Text != "") + if (tb_email.Text != "" && Page.IsValid) { m = Member.GetMemberFromLoginName(tb_email.Text); if (m == null) diff --git a/our.umbraco.org/usercontrols/Signup.ascx.designer.cs b/our.umbraco.org/usercontrols/Signup.ascx.designer.cs index 889a5ac8..2fac6e6a 100644 --- a/our.umbraco.org/usercontrols/Signup.ascx.designer.cs +++ b/our.umbraco.org/usercontrols/Signup.ascx.designer.cs @@ -237,6 +237,33 @@ namespace our.usercontrols { /// protected global::System.Web.UI.WebControls.HiddenField tb_lng; + /// + /// lbl_recaptcha control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lbl_recaptcha; + + /// + /// recaptcha control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::Recaptcha.RecaptchaControl recaptcha; + + /// + /// err_recaptcha control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label err_recaptcha; + /// /// bt_submit control. /// diff --git a/packages/repositories.config b/packages/repositories.config index 3e0d7ee9..f7514f9e 100644 --- a/packages/repositories.config +++ b/packages/repositories.config @@ -1,5 +1,6 @@  + diff --git a/uWiki/BusinessLogic/WikiFile.cs b/uWiki/BusinessLogic/WikiFile.cs index 488dcb0b..09132a1a 100644 --- a/uWiki/BusinessLogic/WikiFile.cs +++ b/uWiki/BusinessLogic/WikiFile.cs @@ -90,7 +90,8 @@ namespace uWiki.Businesslogic if (Directory.Exists(HttpContext.Current.Server.MapPath(path)) == false) Directory.CreateDirectory(HttpContext.Current.Server.MapPath(path)); - + + path = string.Format("{0}/{1}_{2}.{3}", path, DateTime.Now.Ticks, umbraco.cms.helpers.url.FormatUrl(filename), extension); file.SaveAs(HttpContext.Current.Server.MapPath(path));