Security framework of XStream not initialized, XStream is probably vulnerable

后端 未结 3 731
耶瑟儿~
耶瑟儿~ 2021-01-03 18:30

Security framework of XStream not initialized, XStream is probably vulnerable

I keep getting this console error in red while using XStream (1.4.10)

3条回答
  •  北海茫月
    2021-01-03 19:05

    I had the same "problem" and solved it by allowing the relevant types:

    Class[] classes = new Class[] { ABC.class, XYZ.class };
    XStream xStream = new XStream();
    XStream.setupDefaultSecurity(xStream);
    xStream.allowTypes(classes);
    

    Maybe this also helps in your case.

    Good luck!

提交回复
热议问题