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

fix: always reject invalid requests #1101

Merged
merged 30 commits into from
Apr 27, 2020
Merged

fix: always reject invalid requests #1101

merged 30 commits into from
Apr 27, 2020

Conversation

XVincentX
Copy link
Contributor

@XVincentX XVincentX commented Apr 24, 2020

This PR has a good thing and a bad thing.

The good: closes #1091, makes a better use of typings here and there and it also removes a deprecation warning
The bad: it closes the bug in a way that's not cool (basically duplicating some efforts here and there) and shows that it is probably time to resume the rethinking of the validation process that started some time ago. You can find more details on #1135

@XVincentX XVincentX changed the title master fix: always reject invalid requests Apr 25, 2020
@XVincentX XVincentX marked this pull request as ready for review April 25, 2020 19:25
Copy link
Contributor

@karol-maciaszek karol-maciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, as far as I understanding for now. I added few comments and questions.

packages/cli/package.json Outdated Show resolved Hide resolved
test-harness/specs/proxy/proxy.valid-request.txt Outdated Show resolved Hide resolved
packages/http/src/router/__tests__/utils.ts Outdated Show resolved Hide resolved
packages/core/src/factory.ts Show resolved Hide resolved
Copy link
Contributor

@karol-maciaszek karol-maciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍

@XVincentX XVincentX merged commit 79d4c81 into master Apr 27, 2020
@XVincentX XVincentX deleted the fix/validate-proxy branch April 27, 2020 16:29
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Fixed

- Prism will now correctly refuse invalid requests even when used with the `proxy` command [#1101](https://github.com/stoplightio/prism/pull/1101)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so long as --errors is enabled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running ‘prism proxy’ with –errors flag doesn’t enforce required header
3 participants