Skip to content

Commit

Permalink
Merge tag '2.2.1' into develop
Browse files Browse the repository at this point in the history
Fixes "Cannot read property 'ok' of null" bug due to poor cleaning of user provided URLs
  • Loading branch information
keiranmraine committed Feb 25, 2019
2 parents 192003c + 332a3b2 commit c7e95bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## 2.2.1

* URL cleanup patterns corrected

## 2.2.0

* Warn and change file permissions if password file has permissive access.
Expand Down
12 changes: 6 additions & 6 deletions js/jbrowse_rasterize.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ function throwErr(message) {
function urlCleaning(options, url, subdir) {
// Handle standard cleaning of the URL
let address = url
.replace(/loc=[^&]?/, '')
.replace(/&tracklist=[^&]?/, '')
.replace(/&nav=[^&]?/, '')
.replace(/&fullviewlink=[^&]?/, '')
.replace(/&highres=[^&]?/, '')
.replace(/&highlight=[^&]?/, '');
.replace(/loc=[^&]*/, '')
.replace(/&tracklist=[^&]*/, '')
.replace(/&nav=[^&]*/, '')
.replace(/&fullviewlink=[^&]*/, '')
.replace(/&highres=[^&]*/, '')
.replace(/&highlight=[^&]*/, '');

// handle sometimes flaky 0.0.0.0 loopback
address = address.replace(/[/]{2}0\.0\.0\.0/, '//localhost');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cancerit/cgpjbrowsetoolkit",
"version": "2.2.0",
"version": "2.2.1",
"description": "CLI tools for working with JBrowse",
"directories": {
"doc": "docs",
Expand Down

0 comments on commit c7e95bc

Please sign in to comment.