From 3e7b5d05c056dd831c04d848c0b71c983c36b8c3 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 17 Jul 2019 17:34:00 -0400 Subject: [PATCH] fix: invalid uri characters --- dist/bundle.es.js | 4 ++-- src/lbryURI.js | 2 +- src/redux/reducers/claims.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index ec91553..1e9168b 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -904,7 +904,7 @@ const channelNameMinLength = 1; const claimIdMaxLength = 40; // see https://spec.lbry.com/#urls -const regexInvalidURI = /[ =&#:$@%?\u{0000}-\u{0008}\u{000b}-\u{000c}\u{000e}-\u{001F}\u{D800}-\u{DFFF}\u{FFFE}-\u{FFFF}]/gu; +const regexInvalidURI = /[ =&#:$@%?;/\\"<>%{}|^~[\]`\u{0000}-\u{0008}\u{000b}-\u{000c}\u{000e}-\u{001F}\u{D800}-\u{DFFF}\u{FFFE}-\u{FFFF}]/gu; const regexAddress = /^(b|r)(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/; /** @@ -3492,7 +3492,7 @@ const defaultState = { fetchingMyChannels: false, abandoningById: {}, pendingById: {}, - claimSearchError: undefined, + claimSearchError: false, fetchingClaimSearch: false, claimSearchUrisByTags: {}, fetchingClaimSearchByTags: {}, diff --git a/src/lbryURI.js b/src/lbryURI.js index 42045d0..32c6ce6 100644 --- a/src/lbryURI.js +++ b/src/lbryURI.js @@ -2,7 +2,7 @@ const channelNameMinLength = 1; const claimIdMaxLength = 40; // see https://spec.lbry.com/#urls -export const regexInvalidURI = /[ =&#:$@%?\u{0000}-\u{0008}\u{000b}-\u{000c}\u{000e}-\u{001F}\u{D800}-\u{DFFF}\u{FFFE}-\u{FFFF}]/gu; +export const regexInvalidURI = /[ =&#:$@%?;/\\"<>%{}|^~[\]`\u{0000}-\u{0008}\u{000b}-\u{000c}\u{000e}-\u{001F}\u{D800}-\u{DFFF}\u{FFFE}-\u{FFFF}]/gu; export const regexAddress = /^(b|r)(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/; /** diff --git a/src/redux/reducers/claims.js b/src/redux/reducers/claims.js index e317af7..1ef4c40 100644 --- a/src/redux/reducers/claims.js +++ b/src/redux/reducers/claims.js @@ -46,7 +46,7 @@ const defaultState = { fetchingMyChannels: false, abandoningById: {}, pendingById: {}, - claimSearchError: undefined, + claimSearchError: false, fetchingClaimSearch: false, claimSearchUrisByTags: {}, fetchingClaimSearchByTags: {},