You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a test case that sounds similar to #247 (ConsString does not transforms to java.lang.String when passed to the host java object).
A test HTML (including all the necessary JS) can be found at https://pastebin.com/bVbPx1sR and the error is java.lang.ClassCastException: org.mozilla.javascript.ConsString cannot be cast to java.lang.String.
The offending function n() seems to be a variation of Base64 and not a straight implementation, so replacing it with a native function won't work.
For example, a datacode of .MDct5SMft2YhJHdvcDO2kTOyI9[@]L@kjZhVjN@MTO2YTNhJ2MiJmZ6[@]QTNyQ9[@]N3MWY6[@]c9[@]M4g9[@]L@9SbvNmLl5Was52bl1WYyZGeuIDdt4GZj9yLtranslates intoLy9jZG4tdDIueGZyYW1lb25saW5lLmNvbS90L?g4M?c?YWM3N?QyNTQ?ZmJiM2JhNTY2OTM0NjVhZjk0L?IyOTk2ODcvdHJhY2tfMS5tcDM= which would be fed to n() and neither Java, nor https://www.base64decode.org/ consider to be straight Base64.
Hi, funny js code, looks like some script kid likes to hide something :-)
Have done a small test with the provided code from the html file and this works fine here (//cdn-t2.xframeonline.com/t/ac5cc69ea8484dd19e1c9cc5d5897a4aÿò297913/track_1.mp3).
Can you please provide a complete sample (including the rhino version you are using and the setup code for the engine).
I have a test case that sounds similar to #247 (ConsString does not transforms to java.lang.String when passed to the host java object).
A test HTML (including all the necessary JS) can be found at https://pastebin.com/bVbPx1sR and the error is
java.lang.ClassCastException: org.mozilla.javascript.ConsString cannot be cast to java.lang.String
.The offending function n() seems to be a variation of Base64 and not a straight implementation, so replacing it with a native function won't work.
For example, a datacode of
.MDct5SMft2YhJHdvcDO2kTOyI9[@]L@kjZhVjN@MTO2YTNhJ2MiJmZ6[@]QTNyQ9[@]N3MWY6[@]c9[@]M4g9[@]L@9SbvNmLl5Was52bl1WYyZGeuIDdt4GZj9yL
translates intoLy9jZG4tdDIueGZyYW1lb25saW5lLmNvbS90L?g4M?c?YWM3N?QyNTQ?ZmJiM2JhNTY2OTM0NjVhZjk0L?IyOTk2ODcvdHJhY2tfMS5tcDM=
which would be fed to n() and neither Java, nor https://www.base64decode.org/ consider to be straight Base64.Example code:
Using Nashorn instead of Rhino works, but kinda defeats the purpose of targeting one engine throughout an entire project.
Thanks in advance for any suggestions you can provide!
The text was updated successfully, but these errors were encountered: