Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additionalHeaders and rejectUnauthorized are not respected by the extension #37

Closed
rozpuszczalny opened this issue May 19, 2021 · 3 comments · Fixed by #41
Closed

additionalHeaders and rejectUnauthorized are not respected by the extension #37

rozpuszczalny opened this issue May 19, 2021 · 3 comments · Fixed by #41
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rozpuszczalny
Copy link
Owner

rozpuszczalny commented May 19, 2021

Both additionalHeaders and rejectUnauthorized options are not respected by the extension.

Steps to reproduce:

  1. Set redmine.additionalHeaders to {"Authorization": "Anything"}
  2. Set redmine.url to any webserver address, which can intercept headers (e.g. Burp Suite)
  3. Run Redmine: List open issues assigned to me

Expected results

Request headers should include Authorization: Anything.

Actual results

No header Authorization is found in the request headers.

Note for new-commers

Creating new instance of RedmineServer does not include additionalHeaders and rejectUnauthorized from configuration. One needs to additionally parse and pass these options into the new instances. These are created in src/extension.ts, src/trees/my-issues-tree.ts and src/trees/projects-tree.ts:

const config = vscode.workspace.getConfiguration(
"redmine"
) as RedmineConfig;
this.server = new RedmineServer({
address: config.url,
key: config.apiKey,
});
}

const config = vscode.workspace.getConfiguration(
"redmine"
) as RedmineConfig;
this.server = new RedmineServer({
address: config.url,
key: config.apiKey,
});

const config = vscode.workspace.getConfiguration(
"redmine",
v && v.uri
) as RedmineConfig;
const redmineServer = new RedmineServer({
address: config.url,
key: config.apiKey,
});

Thanks to @saiballo for spotting that!

@rozpuszczalny rozpuszczalny added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels May 19, 2021
@saiballo
Copy link

any news about this issue? :-)

@rozpuszczalny
Copy link
Owner Author

@saiballo I was hoping that some newcomer will pick the issue and solve it ;) Anyway, since no one is interested in it, I'll fix it soon then

@saiballo
Copy link

saiballo commented Jul 6, 2021

thank you very much!!!

rozpuszczalny added a commit that referenced this issue Oct 13, 2021
…s-from-config

#37 | Respect rejectUnauthorized and additionalHeaders in http(s) options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants