@suffolklitlab/alkiln 4.11.1 → 4.11.2

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.
package/CHANGELOG.md CHANGED
@@ -40,6 +40,13 @@ Format:
40
40
  -->
41
41
  <!-- ## [Unreleased] -->
42
42
 
43
+ ## [4.11.2] - 2023-03-22
44
+ ### Security
45
+ - Pass docassemble API keys through HTTP headers instead of as parameters.
46
+ - ACTION: all users should delete any uWSGI logs that show their API keys.
47
+ - Parameters to certain HTTP requests are printed directly in docassemble's
48
+ uWSGI log, leaking API keys to actors with log access on your docassemble
49
+ server.
43
50
 
44
51
  ## [4.11.1] - 2023-03-21
45
52
  ### Changed
@@ -19,8 +19,8 @@ da.get_dev_id = async function ( timeout ) {
19
19
  /* Get docassemble developer id. */
20
20
  let options = {
21
21
  method: 'GET',
22
+ headers: {'X-API-Key': session_vars.get_dev_api_key()},
22
23
  url: `${ session_vars.get_da_server_url() }/api/user`,
23
- params: { key: session_vars.get_dev_api_key(), },
24
24
  timeout: timeout,
25
25
  };
26
26
 
@@ -37,9 +37,9 @@ da.create_project = async function ( project_name, timeout ) {
37
37
  /* Create a new project on the user's da server. */
38
38
  let options = {
39
39
  method: 'POST',
40
+ headers: {'X-API-Key': session_vars.get_dev_api_key()},
40
41
  url: `${ session_vars.get_da_server_url() }/api/playground/project`,
41
42
  data: qs.stringify({
42
- key: session_vars.get_dev_api_key(),
43
43
  project: project_name,
44
44
  }),
45
45
  timeout: timeout,
@@ -58,9 +58,9 @@ da.pull = async function ( timeout ) {
58
58
  /* Pull github code into an existing Project. */
59
59
  let options = {
60
60
  method: 'POST',
61
+ headers: {'X-API-Key': session_vars.get_dev_api_key()},
61
62
  url: `${ session_vars.get_da_server_url() }/api/playground_pull`,
62
63
  data: qs.stringify({
63
- key: session_vars.get_dev_api_key(),
64
64
  project: session_vars.get_project_name(),
65
65
  github_url: session_vars.get_repo_url(),
66
66
  branch: session_vars.get_branch_name(),
@@ -81,9 +81,9 @@ da.has_task_finished = async function ( task_id, timeout ) {
81
81
  /* Check task status based on `task_id`. */
82
82
  let options = {
83
83
  method: 'GET',
84
+ headers: {'X-API-Key': session_vars.get_dev_api_key()},
84
85
  url: `${ session_vars.get_da_server_url() }/api/restart_status`,
85
86
  params: {
86
- key: session_vars.get_dev_api_key(),
87
87
  task_id: task_id,
88
88
  },
89
89
  timeout: timeout,
@@ -102,9 +102,9 @@ da.delete_project = async function ( timeout ) {
102
102
  /* Delete a project on the user's da server. */
103
103
  let options = {
104
104
  method: 'DELETE',
105
+ headers: {'X-API-Key': session_vars.get_dev_api_key()},
105
106
  url: `${ session_vars.get_da_server_url() }/api/playground/project`,
106
107
  params: {
107
- key: session_vars.get_dev_api_key(),
108
108
  project: session_vars.get_project_name(),
109
109
  },
110
110
  timeout: timeout,
@@ -132,9 +132,9 @@ da.__delete_projects_starting_with = async function ( base_name, starting_num=1,
132
132
 
133
133
  let options = {
134
134
  method: 'DELETE',
135
+ headers: {'X-API-Key': session_vars.get_dev_api_key()},
135
136
  url: `${ session_vars.get_da_server_url() }/api/playground/project`,
136
137
  params: {
137
- key: session_vars.get_dev_api_key(),
138
138
  project: project_name,
139
139
  },
140
140
  timeout: 30 * 1000,
@@ -222,7 +222,7 @@ da_i.loop_to_create_project = async function( creation_options ) {
222
222
 
223
223
  } catch ( error ) {
224
224
  // TODO: Make a `normalize_ajax_responses_and_errors()`?
225
- let response = error.response;
225
+ let response = error;
226
226
 
227
227
  if ( response && response.data ) {
228
228
  if ( response.data.includes( `Invalid project` ) ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "4.11.1",
3
+ "version": "4.11.2",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {