From 5a0d41048868eddd709c6e9bb71a8c5243d239c0 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 28 Jul 2015 14:20:55 +0200 Subject: tests for _parseTime with hex and empty strings --- core/js/share.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/js/share.js') diff --git a/core/js/share.js b/core/js/share.js index f767da18da0..99fd08c6411 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -827,6 +827,10 @@ OC.Share={ */ _parseTime: function(time) { if (_.isString(time)) { + // skip empty strings and hex values + if (time === '' || (time.length > 1 && time[0] === '0' && time[1] === 'x')) { + return null; + } time = parseInt(time, 10); if(isNaN(time)) { time = null; -- cgit v1.2.3