Skip to content

Commit 502a52b

Browse files
chore(release): 1.19.4 [skip ci]
## [1.19.4](v1.19.3...v1.19.4) (2021-06-24) ### Bug Fixes * **lint:** lint and publish [#622](#622) ([c3988b6](c3988b6))
1 parent 61dedd9 commit 502a52b

6 files changed

+46
-25
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.19.4](https://github.com/MrSwitch/hello.js/compare/v1.19.3...v1.19.4) (2021-06-24)
2+
3+
4+
### Bug Fixes
5+
6+
* **lint:** lint and publish [#622](https://github.com/MrSwitch/hello.js/issues/622) ([c3988b6](https://github.com/MrSwitch/hello.js/commit/c3988b649b18f2d83d80c1ebb9819fd48359484a))
7+
18
## [1.19.3](https://github.com/MrSwitch/hello.js/compare/v1.19.2...v1.19.3) (2021-04-13)
29

310

dist/hello.all.js

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! hellojs v1.19.3 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
1+
/*! hellojs v1.19.4 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
22
// ES5 Object.create
33
if (!Object.create) {
44

@@ -1454,19 +1454,26 @@ hello.utils.extend(hello.utils, {
14541454
// OAuth2 or OAuth1 server response?
14551455
if (p && p.state && (p.code || p.oauth_token)) {
14561456

1457-
var state = JSON.parse(p.state);
1457+
try {
1458+
var state = JSON.parse(p.state);
14581459

1459-
// Add this path as the redirect_uri
1460-
p.redirect_uri = state.redirect_uri || location.href.replace(/[\?\#].*$/, '');
1460+
// Add this path as the redirect_uri
1461+
p.redirect_uri = state.redirect_uri || location.href.replace(/[\?\#].*$/, '');
14611462

1462-
// Redirect to the host
1463-
var path = _this.qs(state.oauth_proxy, p);
1463+
// Redirect to the host
1464+
var path = _this.qs(state.oauth_proxy, p);
14641465

1465-
if (isValidUrl(path)) {
1466-
location.assign(path);
1467-
}
14681466

1469-
return;
1467+
if (isValidUrl(path)) {
1468+
location.assign(path);
1469+
}
1470+
1471+
return;
1472+
}
1473+
catch (e) {
1474+
console.error('Could not decode state parameter', e);
1475+
return;
1476+
}
14701477
}
14711478

14721479
// Save session, from redirected authentication

dist/hello.all.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hello.js

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! hellojs v1.19.3 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
1+
/*! hellojs v1.19.4 - (c) 2012-2021 Andrew Dodson - MIT https://adodson.com/hello.js/LICENSE */
22
// ES5 Object.create
33
if (!Object.create) {
44

@@ -1454,19 +1454,26 @@ hello.utils.extend(hello.utils, {
14541454
// OAuth2 or OAuth1 server response?
14551455
if (p && p.state && (p.code || p.oauth_token)) {
14561456

1457-
var state = JSON.parse(p.state);
1457+
try {
1458+
var state = JSON.parse(p.state);
14581459

1459-
// Add this path as the redirect_uri
1460-
p.redirect_uri = state.redirect_uri || location.href.replace(/[\?\#].*$/, '');
1460+
// Add this path as the redirect_uri
1461+
p.redirect_uri = state.redirect_uri || location.href.replace(/[\?\#].*$/, '');
14611462

1462-
// Redirect to the host
1463-
var path = _this.qs(state.oauth_proxy, p);
1463+
// Redirect to the host
1464+
var path = _this.qs(state.oauth_proxy, p);
14641465

1465-
if (isValidUrl(path)) {
1466-
location.assign(path);
1467-
}
14681466

1469-
return;
1467+
if (isValidUrl(path)) {
1468+
location.assign(path);
1469+
}
1470+
1471+
return;
1472+
}
1473+
catch (e) {
1474+
console.error('Could not decode state parameter', e);
1475+
return;
1476+
}
14701477
}
14711478

14721479
// Save session, from redirected authentication

dist/hello.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hellojs",
3-
"version": "1.19.3",
3+
"version": "1.19.4",
44
"description": "A clientside Javascript library for standardizing requests to OAuth2 web services (and OAuth1 - with a shim)",
55
"homepage": "https://adodson.com/hello.js",
66
"main": "dist/hello.all.js",

0 commit comments

Comments
 (0)