@girder/core 3.1.22 → 3.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/auth.js +10 -1
  2. package/package.json +13 -13
package/auth.js CHANGED
@@ -68,6 +68,15 @@ function fetchCurrentUser() {
68
68
  });
69
69
  }
70
70
 
71
+ /**
72
+ * Encode password using TextEncoder to support unicode
73
+ */
74
+ function basicAuthEncode(username, password) {
75
+ const encoder = new TextEncoder();
76
+ const data = encoder.encode(username + ':' + password);
77
+ return 'Basic ' + btoa(String.fromCharCode(...data));
78
+ }
79
+
71
80
  /**
72
81
  * Log in to the server. If successful, sets the value of currentUser
73
82
  * and currentToken and triggers the "g:login" and "g:login.success".
@@ -81,7 +90,7 @@ function fetchCurrentUser() {
81
90
  * @param otpToken An optional one-time password to include with the login.
82
91
  */
83
92
  function login(username, password, cors = corsAuth, otpToken = null) {
84
- var auth = 'Basic ' + window.btoa(username + ':' + password);
93
+ var auth = basicAuthEncode(username, password);
85
94
 
86
95
  const headers = {
87
96
  Authorization: auth
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girder/core",
3
- "version": "3.1.22",
3
+ "version": "3.1.23",
4
4
  "description": "Extensible data management platform",
5
5
  "homepage": "https://girder.readthedocs.org",
6
6
  "bugs": {
@@ -12,23 +12,23 @@
12
12
  "url": "https://github.com/girder/girder.git"
13
13
  },
14
14
  "dependencies": {
15
- "as-jqplot": "~1.0.8",
16
- "backbone": "~1.4.0",
17
- "bootstrap": "~3.4.1",
15
+ "as-jqplot": "^1.0.8",
16
+ "backbone": "^1.4.0",
17
+ "bootstrap": "^3.4.1",
18
18
  "bootstrap-switch": "~3.3.4",
19
- "eonasdan-bootstrap-datetimepicker": "~4.17",
19
+ "eonasdan-bootstrap-datetimepicker": "^4.17",
20
20
  "@girder/fontello": "*",
21
- "jquery": "~3.5.1",
21
+ "jquery": "^3.7.0",
22
22
  "jsoneditor": "~5.9.3",
23
- "moment": "~2.24.0",
24
- "moment-timezone": "~0.5.27",
23
+ "moment": "^2.24.0",
24
+ "moment-timezone": "^0.5.27",
25
25
  "qrcode": "~1.4.4",
26
- "remarkable": "~2.0.0",
27
- "sprintf-js": "~1.1.2",
28
- "swagger-ui": "~2.2.10",
26
+ "remarkable": "^2.0.0",
27
+ "sprintf-js": "^1.1.2",
28
+ "swagger-ui": "^2.2.10",
29
29
  "typeface-open-sans": "^0.0.75",
30
- "underscore": "~1.13.6",
31
- "url-otpauth": "~2.0.0"
30
+ "underscore": "^1.13.6",
31
+ "url-otpauth": "^2.0.0"
32
32
  },
33
33
  "main": "./index.js"
34
34
  }