How to use ESAPI Logger in an Android Native or Corodva Application

浪尽此生 提交于 2019-12-08 13:22:20

问题


I am new to ESAPI and I have added esapi-2.0.1 jar to my Android app,was able to call any of the ESAPI methods.However, I am getting Caused by: java.lang.IllegalArgumentException: Failed to load ESAPI.properties as a classloader resource Error.My concern is it possible to use ESAPI for any android apps and if Yes then where to locate ESAPI.properties in an App.

Any help would be appreciated.

PS:This is my first question on stackoverflow.com pardon me if I did not follow any of the rules .

Update:There is a similar question looking for an answer can we use owasp-ESAPI for logging android application?

Update 1:Sample code

   'String val = "twenty-one%0a%0aINFO:+User+logged+out%3dbadguy";
    val = ESAPI.encoder().encodeForHTML(val);
    try {

        int value = Integer.parseInt(val);

    } catch (NumberFormatException e) {
        Log.v("ESAPI", "Failed to parse val = " + val);

    }'

来源:https://stackoverflow.com/questions/46947541/how-to-use-esapi-logger-in-an-android-native-or-corodva-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!