require password in RegisterAccount to be at least 3 chars long

This commit is contained in:
2013-11-01 16:35:16 +01:00
parent e63dfb60d0
commit 8dedf11d24
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -126,6 +126,8 @@ namespace PocketSharp
/// Invalid email address.
/// or
/// Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.
/// or
/// Invalid password.
/// </exception>
/// <exception cref="PocketException"></exception>
public async Task<bool> RegisterAccount(string username, string email, string password)
@@ -148,6 +150,11 @@ namespace PocketSharp
throw new FormatException("(2) Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.");
}
if (password.Length < 3)
{
throw new FormatException("(3) Invalid password.");
}
RegisterParameters parameters = new RegisterParameters()
{
Username = username,
+1 -1
View File
@@ -7,7 +7,7 @@
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>https://raw.github.com/ceee/PocketSharp/master/LICENSE-MIT</licenseUrl>
<projectUrl>http://pocketsharp.frontendplay.com</projectUrl>
<projectUrl>https://github.com/ceee/PocketSharp</projectUrl>
<iconUrl>https://raw.github.com/ceee/PocketSharp/master/pocketsharp.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>PocketSharp is a C#.NET portable class library that integrates the Pocket API v3.</description>