allow dashed uuid

This commit is contained in:
jomo
2014-11-22 21:28:54 +01:00
parent 3830b3ccf4
commit 3216833887
2 changed files with 6 additions and 3 deletions

View File

@@ -3,7 +3,8 @@ var config = require('./config');
var cache = require('./cache');
var skins = require('./skins');
var valid_uuid = /^([0-9a-f]{32}|[a-zA-Z0-9_]{1,16})$/; // uuid|username
// 0098cb60-fa8e-427c-b299-793cbd302c9a
var valid_uuid = /^([0-9a-f-]{32,36}|[a-zA-Z0-9_]{1,16})$/; // uuid|username
var hash_pattern = /([^\/]+)(?=\.\w{0,16}$)|((?:[a-z][a-z]*[0-9]+[a-z0-9]*))/;
function get_hash(url) {