summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-28 14:20:55 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-28 14:20:55 +0200
commit5a0d41048868eddd709c6e9bb71a8c5243d239c0 (patch)
treeae7ae122e408a9994e846150a45a65c9308ac667 /core/js/share.js
parentebfbb97e66ef5d4c3dbe6b2eb23d19cba9ab74bd (diff)
downloadnextcloud-server-5a0d41048868eddd709c6e9bb71a8c5243d239c0.tar.gz
nextcloud-server-5a0d41048868eddd709c6e9bb71a8c5243d239c0.zip
tests for _parseTime with hex and empty strings
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js4
1 files changed, 4 insertions, 0 deletions
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;