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

WIP: Bump ANSIBLE_VERSION_MAX to 2.14 #977

Closed
wants to merge 2 commits into from

Conversation

opoplawski
Copy link
Contributor

Thanks for creating a PR! Here's a quick checklist to pay attention to:

  • Please add an entry to docs/changelog.rst as appropriate.

  • Has some new parameter been added or semantics modified somehow? Please
    ensure relevant documentation is updated in docs/ansible.rst and
    docs/api.rst.

  • If it's for new functionality, is there at least a basic test in either
    tests/ or tests/ansible/ covering it?

  • If it's for a new connection method, please try to stub out the
    implementation as in tests/data/stubs/, so that construction can be tested
    without having a working configuration.

Worked in my minimal testing - hopefully mitogen has some CI that will run...

@moreati moreati marked this pull request as draft February 5, 2023 17:42
@nerijus
Copy link
Contributor

nerijus commented Feb 21, 2023

Could you please apply it? It works with git master.

@brad-u410
Copy link

I would also like this merged. I've been using for weeks with no issue

@djuarezg
Copy link

djuarezg commented Jul 5, 2023

any possibility to update it?

@opoplawski
Copy link
Contributor Author

Rebased with #1017 . Fixes #974

moreati added a commit to moreati/mitogen that referenced this pull request Mar 28, 2024
If casting a string fails then raise a TypeError. This is potentially an API
breaking change; chosen as the lesser evil vs. allowing silent errors.

`cast()` relies on `bytes(obj)` & `str(obj)` returning the respective
supertype. That's no longer the case for `AnsibleUnsafeBytes` &
`AnsibleUnsafeText`; since fixes/mitigations for  CVE-2023-5764.

fixes mitogen-hq#1046, refs mitogen-hq#977

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
moreati added a commit to moreati/mitogen that referenced this pull request Mar 28, 2024
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs mitogen-hq#977, refs mitogen-hq#1046

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
moreati added a commit to moreati/mitogen that referenced this pull request Mar 28, 2024
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs mitogen-hq#977, refs mitogen-hq#1046

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
moreati added a commit to moreati/mitogen that referenced this pull request Mar 28, 2024
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs mitogen-hq#977, refs mitogen-hq#1046

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
moreati added a commit that referenced this pull request Apr 4, 2024
If casting a string fails then raise a TypeError. This is potentially an API
breaking change; chosen as the lesser evil vs. allowing silent errors.

`cast()` relies on `bytes(obj)` & `str(obj)` returning the respective
supertype. That's no longer the case for `AnsibleUnsafeBytes` &
`AnsibleUnsafeText`; since fixes/mitigations for  CVE-2023-5764.

fixes #1046, refs #977

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
moreati added a commit that referenced this pull request Apr 4, 2024
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs #977, refs #1046

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
moreati added a commit that referenced this pull request Apr 4, 2024
If casting a string fails then raise a TypeError. This is potentially an API
breaking change; chosen as the lesser evil vs. allowing silent errors.

`cast()` relies on `bytes(obj)` & `str(obj)` returning the respective
supertype. That's no longer the case for `AnsibleUnsafeBytes` &
`AnsibleUnsafeText`; since fixes/mitigations for  CVE-2023-5764.

fixes #1046, refs #977

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
moreati added a commit that referenced this pull request Apr 4, 2024
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs #977, refs #1046

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
@moreati
Copy link
Member

moreati commented Apr 4, 2024

Incorporated into PR #1017

@moreati moreati closed this Apr 4, 2024
rjhesketh pushed a commit to bbc/mitogen that referenced this pull request Jul 10, 2024
If casting a string fails then raise a TypeError. This is potentially an API
breaking change; chosen as the lesser evil vs. allowing silent errors.

`cast()` relies on `bytes(obj)` & `str(obj)` returning the respective
supertype. That's no longer the case for `AnsibleUnsafeBytes` &
`AnsibleUnsafeText`; since fixes/mitigations for  CVE-2023-5764.

fixes mitogen-hq#1046, refs mitogen-hq#977

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
rjhesketh pushed a commit to bbc/mitogen that referenced this pull request Jul 10, 2024
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs mitogen-hq#977, refs mitogen-hq#1046

See also
- GHSA-7j69-qfc3-2fq9
- ansible/ansible#82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
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.

6 participants