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

Deserialization of dynamic proxy instances ignores configured ClassLoader #8033

Closed
zerhacker opened this issue Apr 27, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@zerhacker
Copy link
Contributor

commented Apr 27, 2016

This is a bug in the method
public static ObjectInputStream newObjectInputStream(final ClassLoader classLoader, final InputStream in) throws IOException
of the class com.hazelcast.nio.IOUtil.
The current implementation is:

    public static ObjectInputStream newObjectInputStream(final ClassLoader classLoader, final InputStream in) throws IOException {
        return new ObjectInputStream(in) {
            protected Class<?> resolveClass(final ObjectStreamClass desc) throws ClassNotFoundException {
                return ClassLoaderUtil.loadClass(classLoader, desc.getName());
            }
        };
    }

The method
protected Class<?> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException
of the ObjectInputStream must be overridden as well.
This bug affects all versions of hazelcast.

@jerrinot jerrinot added this to the 3.7 milestone Apr 27, 2016

@jerrinot

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2016

@zerhacker: good finding! are you interested in sending a PR?

@zerhacker

This comment has been minimized.

Copy link
Contributor Author

commented Apr 27, 2016

Hmm, I never done this before. But I can try it...

@jerrinot

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2016

@zerhacker: that would be great. Let me know if you need any help. I usually hangout at https://gitter.im/hazelcast/hazelcast

We would need you to sign a Contributor Agreement: https://hazelcast.atlassian.net/wiki/display/COM/Hazelcast+Contributor+Agreement in order to accept a change.

jerrinot added a commit that referenced this issue May 13, 2016

Merge pull request #8047 from zerhacker/master
Fix for issue #8033: Deserialization of dynamic proxy instances ignores configured ClassLoader
@jerrinot

This comment has been minimized.

Copy link
Contributor

commented May 23, 2016

fixed by #8047
@zerhacker: once more thanks for an excellent contribution!

@jerrinot jerrinot closed this May 23, 2016

@zerhacker

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2016

Hello Jaromir,

it was an interesting experience. ;-)
Do you know what the planned release date for Hazelcast 3.7 is?

Best regards

Falk

Am 23.05.2016 um 08:45 schrieb Jaromir Hamala notifications@github.com:

fixed by #8047 #8047
@zerhacker https://github.com/zerhacker: once more thanks for an excellent contribution!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #8033 (comment)

@jerrinot

This comment has been minimized.

Copy link
Contributor

commented May 23, 2016

@zerhacker:
We are just about to enter a feature freeze.

It usually takes 2-5 weeks to get it into the state where we are happy to release. Please take this with a grain of salt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.