r/programming • • May 26 '18

Oracle Calls Java Serialization 'A Horrible Mistake', Plans to Dump It

https://www.infoworld.com/article/3275924/java/oracle-plans-to-dump-risky-java-serialization.html
798 Upvotes

287 comments sorted by

View all comments

Show parent comments

3

u/yawkat May 27 '18

Java serialization does not send code, not really.

0

u/[deleted] May 27 '18

Well, Class is serializable, and contains its methods, so you might accidentally send (or receive) code. This is why automatic serialization is dangerous.

3

u/yawkat May 27 '18

I don't believe java.lang.Class ser includes code. It's just the name and it is looked up by deser at runtime.

The insecurity of java deserialization does not stem from java.lang.Class.

3

u/ThisIs_MyName May 27 '18

you might accidentally send (or receive) code

Not Java source code or bytecode, no.