Skip to content

Conversation

@mmerickel
Copy link
Member

No description provided.

@mmerickel
Copy link
Member Author

This is ready for review. I can remove the specificity stuff from AcceptOffer if desired... it's not used anywhere but isn't really hurting anything and the conceptual ordering is used in a lot of places. I chose to not add a separate PR for a bug fix with acceptable_offers where Accept: */* did not match a range-based offer.

Copy link
Member

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

LGTM.

see the multitude of reasons in
Pylons/pyramid#3326

the short answer is that they are fundamentally broken in that media
ranges cannot properly match against any accept header with q=0 content
@mmerickel
Copy link
Member Author

mmerickel commented Oct 10, 2018

This PR now incorporates #378 and removes media range support from parse_offer and subsequently acceptable_offers. I would recommend merging #378 first and then reviewing this PR afterward.

mz2 pushed a commit to canonical/certification-errbot that referenced this pull request Feb 7, 2025
Bumps [webob](https://github.com/Pylons/webob) from 1.8.7 to 1.8.8.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Pylons/webob/blob/main/CHANGES.txt">webob's
changelog</a>.</em></p>
<blockquote>
<h2>Unreleased</h2>
<p>Security Fix</p>
<pre><code>
- The use of WebOb's Response object to redirect a request to a new
location
  can lead to an open redirect if the Location header is not a full URI.
<p>See <a
href="https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3">https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3</a><br
/>
and CVE-2024-42353</p>
<p>Thanks to Sara Gao for the report</p>
<p>(This fix was released in WebOb 1.8.8)</p>
<p>Feature</p>
<pre><code>
- Rename &amp;quot;master&amp;quot; git branch to
&amp;quot;main&amp;quot;

- Add support for Python 3.12.

- Add Request.remote_host, exposing REMOTE_HOST environment variable.

- Added ``acceptparse.Accept.parse_offer`` to codify what types of
offers
are compatible with ``acceptparse.AcceptValidHeader.acceptable_offers``,
  ``acceptparse.AcceptMissingHeader.acceptable_offers``, and
  ``acceptparse.AcceptInvalidHeader.acceptable_offers``. This API also
  normalizes the offer with lowercased type/subtype and parameter names.
  See Pylons/webob#376 and
  Pylons/webob#379

Compatibility
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Backwards Incompatibilities&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
- Drop support for Python 2.7, 3.4, 3.5, 3.6, and 3.7.

Experimental Features
</code></pre>
<ul>
<li>
<p>The SameSite value now includes a new option named &quot;None&quot;,
this is a new<br />
change that was introduced in<br />
<a
href="https://tools.ietf.org/html/draft-west-cookie-incrementalism-00">https://tools.ietf.org/html/draft-west-cookie-incrementalism-00</a></p>
<p>Please be aware that older clients are incompatible with this
change:<br />
&lt;/tr&gt;&lt;/table&gt;<br />
</code></pre></p>
</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Pylons/webob/commit/f2bdd835d6ca1884b5e03e7778f5ede1737f8bc7"><code>f2bdd83</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/Pylons/webob/commit/913fa2cbbfca0f394716ac30c6f910b461f3e8f6"><code>913fa2c</code></a>
Update CHANGES.txt</li>
<li><a
href="https://github.com/Pylons/webob/commit/f2e92f3c42d889dd74ffd07ab85d5b6a6c32a5d5"><code>f2e92f3</code></a>
WebOb version revised to 1.8.8</li>
<li><a
href="https://github.com/Pylons/webob/commit/a06856a9a3e0a01b469dc66d0ed8474711a4b5d9"><code>a06856a</code></a>
Build the latest version from tox</li>
<li><a
href="https://github.com/Pylons/webob/commit/819f43c911d377ca9ebc15146772b0c918eb7e5a"><code>819f43c</code></a>
Add MANIFEST.in to build source tarball</li>
<li><a
href="https://github.com/Pylons/webob/commit/411df96de2c661d6e9566f2bd2a12ea17d89d97b"><code>411df96</code></a>
s/isAlive/is_alive/</li>
<li><a
href="https://github.com/Pylons/webob/commit/5ae9b5d2f472dfa62536b04e78eaaa2b1e153e7e"><code>5ae9b5d</code></a>
Update for newer versions of tox/sphinx</li>
<li><a
href="https://github.com/Pylons/webob/commit/2a2da92b9fd2268ff3d4d5293b2fcdacad0fc859"><code>2a2da92</code></a>
Support for Python 2.7 requires an old version of virtualenv</li>
<li><a
href="https://github.com/Pylons/webob/commit/f689bcf4f0a1f64f1735b1d5069aef5be6974b5b"><code>f689bcf</code></a>
Add fix for open redirect</li>
<li>See full diff in <a
href="https://github.com/Pylons/webob/compare/1.8.7...1.8.8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webob&package-manager=pip&previous-version=1.8.7&new-version=1.8.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/canonical/hwcert-errbot/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mz2 pushed a commit to canonical/certification-errbot that referenced this pull request Feb 7, 2025
Bumps [webob](https://github.com/Pylons/webob) from 1.8.7 to 1.8.8.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Pylons/webob/blob/main/CHANGES.txt">webob's
changelog</a>.</em></p>
<blockquote>
<h2>Unreleased</h2>
<p>Security Fix</p>
<pre><code>
- The use of WebOb's Response object to redirect a request to a new
location
  can lead to an open redirect if the Location header is not a full URI.
<p>See <a
href="https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3">https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3</a><br
/>
and CVE-2024-42353</p>
<p>Thanks to Sara Gao for the report</p>
<p>(This fix was released in WebOb 1.8.8)</p>
<p>Feature</p>
<pre><code>
- Rename &amp;quot;master&amp;quot; git branch to
&amp;quot;main&amp;quot;

- Add support for Python 3.12.

- Add Request.remote_host, exposing REMOTE_HOST environment variable.

- Added ``acceptparse.Accept.parse_offer`` to codify what types of
offers
are compatible with ``acceptparse.AcceptValidHeader.acceptable_offers``,
  ``acceptparse.AcceptMissingHeader.acceptable_offers``, and
  ``acceptparse.AcceptInvalidHeader.acceptable_offers``. This API also
  normalizes the offer with lowercased type/subtype and parameter names.
  See Pylons/webob#376 and
  Pylons/webob#379

Compatibility
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Backwards Incompatibilities&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
- Drop support for Python 2.7, 3.4, 3.5, 3.6, and 3.7.

Experimental Features
</code></pre>
<ul>
<li>
<p>The SameSite value now includes a new option named &quot;None&quot;,
this is a new<br />
change that was introduced in<br />
<a
href="https://tools.ietf.org/html/draft-west-cookie-incrementalism-00">https://tools.ietf.org/html/draft-west-cookie-incrementalism-00</a></p>
<p>Please be aware that older clients are incompatible with this
change:<br />
&lt;/tr&gt;&lt;/table&gt;<br />
</code></pre></p>
</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Pylons/webob/commit/f2bdd835d6ca1884b5e03e7778f5ede1737f8bc7"><code>f2bdd83</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/Pylons/webob/commit/913fa2cbbfca0f394716ac30c6f910b461f3e8f6"><code>913fa2c</code></a>
Update CHANGES.txt</li>
<li><a
href="https://github.com/Pylons/webob/commit/f2e92f3c42d889dd74ffd07ab85d5b6a6c32a5d5"><code>f2e92f3</code></a>
WebOb version revised to 1.8.8</li>
<li><a
href="https://github.com/Pylons/webob/commit/a06856a9a3e0a01b469dc66d0ed8474711a4b5d9"><code>a06856a</code></a>
Build the latest version from tox</li>
<li><a
href="https://github.com/Pylons/webob/commit/819f43c911d377ca9ebc15146772b0c918eb7e5a"><code>819f43c</code></a>
Add MANIFEST.in to build source tarball</li>
<li><a
href="https://github.com/Pylons/webob/commit/411df96de2c661d6e9566f2bd2a12ea17d89d97b"><code>411df96</code></a>
s/isAlive/is_alive/</li>
<li><a
href="https://github.com/Pylons/webob/commit/5ae9b5d2f472dfa62536b04e78eaaa2b1e153e7e"><code>5ae9b5d</code></a>
Update for newer versions of tox/sphinx</li>
<li><a
href="https://github.com/Pylons/webob/commit/2a2da92b9fd2268ff3d4d5293b2fcdacad0fc859"><code>2a2da92</code></a>
Support for Python 2.7 requires an old version of virtualenv</li>
<li><a
href="https://github.com/Pylons/webob/commit/f689bcf4f0a1f64f1735b1d5069aef5be6974b5b"><code>f689bcf</code></a>
Add fix for open redirect</li>
<li>See full diff in <a
href="https://github.com/Pylons/webob/compare/1.8.7...1.8.8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webob&package-manager=pip&previous-version=1.8.7&new-version=1.8.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/canonical/hwcert-errbot/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

3 participants