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

Make Objectify and ObjectifyWithAttributes reject input objects which are not plain lists or records #5554

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

fingolfin
Copy link
Member

Also clarify the documentation -- at least for "standard" GAP; it now
misses to mention that atomic lists/records can also be used as input in
HPC-GAP, but that seems acceptable, given the state of HPC-GAP and also
given that we don't mention specifics for it most of the rest of the
regular GAP reference manual.

Background: In the distant path we allowed Objectify to be invoked on
any kind of GAP list or record, even though it was clearly only intended for
plain lists and records (other kinds of inputs could result in corrupt objects
that could even lead to crashes). Passing in another kind of list or string could
in principle be used to "hack" any object into something different. But
that seems like a bad idea in general, and there is no clear use case;
however, there are cases where this can be done by accident.

Hence I tightened this check in early 2020; however, it turned out that
there was actually a call to Objectify on a plain string in HAP, so we
added a workaround for that. This patch removes that workaround.

Of course it should only be merged after a new HAP release with a fix (say gap-packages/hap#117) is released. But then I'd like to merge it ASAP so that we don't regress again.

Also clarify the documentation -- at least for "standard" GAP; it now
misses to mention that atomic lists/records can also be used as input in
HPC-GAP, but that seems acceptable, given the state of HPC-GAP and also
given that we don't mention specifics for it most of the rest of the
regular GAP reference manual.

Background: In the distant path we allowed Objectify to be invoked on
any kind of GAP list or record, even though it was only intended for
plain lists and records. Passing in another kind of list or string could
in principle be used to "hack" any object into something different. But
that seems like a *bad* idea in general, and there is no clear use case;
however, there are cases where this can be done by accident.

Hence I tightened this check in early 2020; however, it turned out that
there was actually a call to Objectify on a plain string in HAP, so we
added a workaround for that. This patch removes that workaround.
@fingolfin fingolfin added the release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes label Jan 8, 2024
@fingolfin
Copy link
Member Author

The tests failed in HAP before, but with the latest HAP update, I did re-run the tests and now they pass.

@fingolfin fingolfin merged commit ce521b3 into gap-system:master Jan 11, 2024
22 checks passed
@fingolfin fingolfin deleted the mh/stricter-Objectify branch January 11, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants