Profesionāls interneta atkarīgais • Spēļu entuziasts • Tehnoloģiju radītājs
Profesionāls interneta atkarīgais • Spēļu entuziasts • Tehnoloģiju radītājs

Kā novērst Java metožu izsaukšanu no XSL, izmantojot TransformerFactory

Kā aizliegt Java metožu izsaukšanu no XSL, izmantojot TransformerFactory!
Šo lapu no angļu valodas jūsu ērtībām ir tulkojuši mani augsti motivētie mākslīgā intelekta praktikanti. Viņi joprojām mācās, tāpēc dažas kļūdas varētu būt paslīdējušas garām. Lai iegūtu visprecīzāko informāciju, lūdzu, skatiet angļu valodas versiju.
Sākums Emuārs Kā novērst Java metožu izsaukšanu no XSL, izmantojot TransformerFactory

Ņem vērā, ka šis ieraksts publicēts 2011. gada aprīlī, tāpēc daļa informācijas var būt novecojusi. Diemžēl ne vienmēr varu visus rakstus pilnībā atjaunināt.

    When using the Java's TransformerFactory to XSL transform XML documents, the XSL document is allowed to call Java methods by default. This however could be a security issue when dealing with third party XSL documents.
    To disallow calling Java methods from the XSD, set the FEATURE_SECURE_PROCESSING feature on the factory:
    TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
    This will result in an TransformerException when transforming the documents:
    Error: Use of the extension function 'java:new' is not allowed when the secure processing feature is set to true. Error during transformation javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension function 'java:new' is not allowed when the secure processing feature is set to true.

    Autors Special Agent Squeaky. Pirmo reizi publicēts 2011-04-23. Pēdējo reizi atjaunināts 2011-04-23.

    📺 Skaties Squeaky jaunāko video!

    Kā pievienot vienkāršus reāllaika subtitrus jūsu tiešraidei.