Remove any control characters in vidly status cache key

RESOLVED FIXED

Status

Webtools
Air Mozilla
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: peterbe, Unassigned)

Tracking

Trunk
x86
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug], URL)

(Reporter)

Description

4 years ago
When we make the cache key [0] we blindly use the tag value of the event. If this contains anything other that [a-z][0-9] it can cause trouble (memcache trouble). 

We should do something like:

   tag = environment['tag']
   cache_key = 'vidly-query-%s' % hashlib.md5(tag).hexdigest()


[0] https://github.com/mozilla/airmozilla/blob/810ead7498fc54895d36c5917d7dec771c835a93/airmozilla/manage/views.py#L2350
(Reporter)

Updated

4 years ago
Whiteboard: [good first bug]

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.