Skip to content

Commit 1253f9c

Browse files
committed
trim/tolower on customer and event id
1 parent 24f9fbc commit 1253f9c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

QueueIT.Security.Documentation/ConfigurationJava.aml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ queryStringPrefix =
5151
ticketExpiration = 180
5252
cookieDomain = .ticketania.com
5353
cookieExpiration = 1200
54+
extendValidity = true
5455
]]>
5556
</code>
5657
<para>

QueueIT.Security/QueueFactory.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,6 @@ public static IQueue CreateQueue(string queueName)
142142
/// </example>
143143
public static IQueue CreateQueue(string customerId, string eventId)
144144
{
145-
if (string.IsNullOrEmpty(customerId))
146-
throw new ArgumentException("Customer ID cannot be null or empty", "customerId");
147-
if (string.IsNullOrEmpty(eventId))
148-
throw new ArgumentException("Event ID cannot be null or empty", "eventId");
149-
150145
var queue = InstantiateQueue(customerId, eventId, null, null, false, false, null, null);
151146

152147
return queue;
@@ -155,6 +150,13 @@ public static IQueue CreateQueue(string customerId, string eventId)
155150
private static Queue InstantiateQueue(string customerId, string eventId, string domainAlias, string landingPage,
156151
bool sslEnabled, bool includeTargetUrl, CultureInfo culture, string layoutName)
157152
{
153+
if (string.IsNullOrEmpty(customerId))
154+
throw new ArgumentException("Customer ID cannot be null or empty", "customerId");
155+
if (string.IsNullOrEmpty(eventId))
156+
throw new ArgumentException("Event ID cannot be null or empty", "eventId");
157+
158+
customerId = customerId.ToLower().Trim();
159+
eventId = eventId.ToLower().Trim();
158160
string key = GenerateKey(customerId, eventId);
159161

160162
Dictionary<string, Queue> queues = _queues;

0 commit comments

Comments
 (0)