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

Escape PAM special characters properly #656

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

d-w-moore
Copy link
Collaborator

@d-w-moore d-w-moore commented Nov 6, 2024

Fix character escaping.

For servers in the 4.2 and 4.3 series, @ and & no longer need escaping. We shall still escape = and ; due to their use as part of kvp (key-value pair) strings in the iRODS protocol.

This fixes the approach to escaping characters from the set: [@&;=]
that iRODS historically has had problems accommodating in PAM passwords
in the past.  Presently, for iRODS 4.2 and 4.3 we only need to consider
";" and "=" as problematic characters, due to the conflict with the
use of those characters in the KVP-formatted context parameter when the
AUTH_PLUG_REQ_AN api is used.
Also correct matching auth scheme names for PAM.  We now compare to
"pam"* so that iRODS 4.2 and 4.3 can both pass the tests.
@d-w-moore d-w-moore changed the title 650.m Escape PAM special characters properly Nov 6, 2024
@d-w-moore d-w-moore marked this pull request as draft November 6, 2024 06:58
@d-w-moore d-w-moore self-assigned this Nov 6, 2024
irods/connection.py Outdated Show resolved Hide resolved
@llp-rug
Copy link

llp-rug commented Nov 13, 2024

It looks like these changes address our issue #650 .

@trel
Copy link
Member

trel commented Nov 13, 2024

Very good - thank you @llp-rug.

@d-w-moore d-w-moore marked this pull request as ready for review November 14, 2024 17:20
irods/connection.py Outdated Show resolved Hide resolved
irods/connection.py Outdated Show resolved Hide resolved
@alanking
Copy link
Contributor

Also please eyeball Codacy

Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

Good. I think that this may be ready for squashing soon...

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

Successfully merging this pull request may close these issues.

4 participants