Skip to content

Don't unmarshal classes that don't include XMLRPC::Marshal #36

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

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

ooooooo-q
Copy link
Contributor

@ooooooo-q ooooooo-q commented Apr 16, 2023

If we unmarshal all classes, evil clients may run unexpected code.

See https://hackerone.com/reports/1189419 for details.

Copy link
Member

Choose a reason for hiding this comment

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

Could you pretty-print this XML like other XML in test/data/?

obj.instance_variable_set("@#{ key }", value) if key =~ /^([a-zA-Z_]\w*)$/
}
obj
if mod.included_modules.include? XMLRPC::Marshallable
Copy link
Member

Choose a reason for hiding this comment

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

Could you return hash when this condition is false like #35?

@hsbt
Copy link
Member

hsbt commented Aug 1, 2023

@kou We should merge this instead of #35. Because @ooooooo-q has been reported this to h1 at May, 2021.

@kou kou changed the title Added restrictions on classes that can be parsed. Don't unmarshal classes that don't include XMLRPC::Marshal Aug 1, 2023
@kou kou merged commit 197f075 into ruby:master Aug 1, 2023
@kou
Copy link
Member

kou commented Aug 1, 2023

Thanks.

@ooooooo-q ooooooo-q deleted the fix/parse_class branch August 26, 2023 23:52
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