Skip to content

Commit

Permalink
chore(release): 1.19.5 [skip ci]
Browse files Browse the repository at this point in the history
## [1.19.5](v1.19.4...v1.19.5) (2021-09-19)

### Bug Fixes

* **redirects:** lock down redirect attempts, fixes [#619](#619) ([544e5ea](544e5ea))
  • Loading branch information
semantic-release-bot committed Sep 19, 2021
1 parent 8200873 commit db93ed7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.19.5](https://github.com/MrSwitch/hello.js/compare/v1.19.4...v1.19.5) (2021-09-19)


### Bug Fixes

* **redirects:** lock down redirect attempts, fixes [#619](https://github.com/MrSwitch/hello.js/issues/619) ([544e5ea](https://github.com/MrSwitch/hello.js/commit/544e5ea3876116d93689e26b2c6a0b9ad9052e14))

## [1.19.4](https://github.com/MrSwitch/hello.js/compare/v1.19.3...v1.19.4) (2021-06-24)


Expand Down
11 changes: 9 additions & 2 deletions dist/hello.all.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! hellojs v1.19.4 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
/*! hellojs v1.19.5 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
// ES5 Object.create
if (!Object.create) {

Expand Down Expand Up @@ -1566,7 +1566,14 @@ hello.utils.extend(hello.utils, {

function isValidUrl(url) {
var regexp = /^https?:/;
return regexp.test(url);
return regexp.test(url)

// If `HELLOJS_REDIRECT_URL` is defined in the window context, validate that the URL matches it.
&& (
!Object.prototype.hasOwnProperty.call(window, 'HELLOJS_REDIRECT_URL')
||
url.match(window.HELLOJS_REDIRECT_URL)
);
}

// Trigger a callback to authenticate
Expand Down
4 changes: 2 additions & 2 deletions dist/hello.all.min.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions dist/hello.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! hellojs v1.19.4 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
/*! hellojs v1.19.5 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
// ES5 Object.create
if (!Object.create) {

Expand Down Expand Up @@ -1566,7 +1566,14 @@ hello.utils.extend(hello.utils, {

function isValidUrl(url) {
var regexp = /^https?:/;
return regexp.test(url);
return regexp.test(url)

// If `HELLOJS_REDIRECT_URL` is defined in the window context, validate that the URL matches it.
&& (
!Object.prototype.hasOwnProperty.call(window, 'HELLOJS_REDIRECT_URL')
||
url.match(window.HELLOJS_REDIRECT_URL)
);
}

// Trigger a callback to authenticate
Expand Down
4 changes: 2 additions & 2 deletions dist/hello.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hellojs",
"version": "1.19.4",
"version": "1.19.5",
"description": "A clientside Javascript library for standardizing requests to OAuth2 web services (and OAuth1 - with a shim)",
"homepage": "https://adodson.com/hello.js",
"main": "dist/hello.all.js",
Expand Down

0 comments on commit db93ed7

Please sign in to comment.