-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathHardLimits.cs
More file actions
52 lines (36 loc) · 1.82 KB
/
HardLimits.cs
File metadata and controls
52 lines (36 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
namespace OpenShock.Common.Constants;
public static class HardLimits
{
public const byte MinControlIntensity = 0;
public const byte MaxControlIntensity = 100;
public const ushort MinControlDuration = 300;
public const ushort MaxControlDuration = 30000; // TODO: No reason to hard limit this to 30 seconds, can we extend it to ushort.MaxValue (65535)?
public const int UsernameMinLength = 3;
public const int UsernameMaxLength = 32;
public const int EmailAddressMinLength = 5; // "a@b.c" (5 chars)
public const int EmailAddressMaxLength = 320; // 64 + 1 + 255 (RFC 2821)
public const int PasswordMinLength = 12;
public const int PasswordMaxLength = 256;
public const int UserAgentMaxLength = 1024;
public const int ApiKeyNameMaxLength = 64;
public const int ApiKeyTokenLength = 64;
public const int ApiKeyMaxPermissions = 256;
public const int HubNameMinLength = 1;
public const int HubNameMaxLength = 64;
public const int HubTokenMaxLength = 256;
public const int ShockerNameMinLength = 1;
public const int ShockerNameMaxLength = 64;
public const int ShockerShareLinkNameMinLength = 1;
public const int ShockerShareLinkNameMaxLength = 64;
public const int SemVerMaxLength = 64;
public const int IpAddressMaxLength = 40;
public const int Sha256HashHexLength = 64;
public const int OtaUpdateMessageMaxLength = 128;
public const int PasswordHashMaxLength = 100;
public const int UserEmailChangeSecretMaxLength = 128;
public const int UserActivationSecretMaxLength = 128;
public const int PasswordResetSecretMaxLength = 100;
public const int ShockerControlLogCustomNameMaxLength = 64;
public const int CreateShareRequestMaxShockers = 128;
public const int MaxShockerControlLogsPerUser = 2048;
}