rozpuszczalny / vscode-redmine

Redmine extension for Visual Studio Code.
MIT License
43 stars 17 forks source link

additionalHeaders and rejectUnauthorized are not respected by the extension #37

Closed rozpuszczalny closed 3 years ago

rozpuszczalny commented 3 years ago

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:

https://github.com/rozpuszczalny/vscode-redmine/blob/cbf738d673453cd367ff440860790711476393c6/src/trees/projects-tree.ts#L11-L18

https://github.com/rozpuszczalny/vscode-redmine/blob/cbf738d673453cd367ff440860790711476393c6/src/trees/my-issues-tree.ts#L9-L15

https://github.com/rozpuszczalny/vscode-redmine/blob/cbf738d673453cd367ff440860790711476393c6/src/extension.ts#L57-L64

Thanks to @saiballo for spotting that!

saiballo commented 3 years ago

any news about this issue? :-)

rozpuszczalny commented 3 years ago

@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 commented 3 years ago

thank you very much!!!