tôi đang tìm kiếm các tập tin giống như khi triển khai ứng dụng web của tôi, tôi đã nhận được -
Mar 08, 2017 1:23:12 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [mvc-dispatcher] in context with path [/WebDynamo] threw exception [org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException SecurityConfiguration class (org.owasp.esapi.reference.DefaultSecurityConfiguration) CTOR threw exception.] with root cause
java.lang.IllegalArgumentException: Failed to load ESAPI.properties as a classloader resource.
at org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfigurationFromClasspath(DefaultSecurityConfiguration.java:667)
Dù sao cho webapp của tôi, tôi chỉ ESAPI.properties thêm vào trong thư mục gốc nguồn (thư mục src) (không thêm nó vào bất kỳ gói nào). Và tệp chỉ trống. Và ứng dụng web hoạt động tốt. Tôi thấy các bản ghi sau trong webapp vì vậy nếu bạn đang tự hỏi nơi tệp này đang được tìm kiếm thì hãy tham khảo điều này -
Attempting to load ESAPI.properties via file I/O.
Attempting to load ESAPI.properties as resource file via file I/O.
Not found in 'org.owasp.esapi.resources' directory or file not readable: /Applications/Eclipse.app/Contents/MacOS/ESAPI.properties
Not found in SystemResource Directory/resourceDirectory: .esapi/ESAPI.properties
Not found in 'user.home' (/Users/athakur) directory: /Users/athakur/esapi/ESAPI.properties
Loading ESAPI.properties via file I/O failed. Exception was: java.io.FileNotFoundException
Attempting to load ESAPI.properties via the classpath.
SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/ (root)' using current thread context class loader!
SecurityConfiguration for Validator.ConfigurationFile not found in ESAPI.properties. Using default: validation.properties
Attempting to load validation.properties via file I/O.
Attempting to load validation.properties as resource file via file I/O.
Not found in 'org.owasp.esapi.resources' directory or file not readable: /Applications/Eclipse.app/Contents/MacOS/validation.properties
Not found in SystemResource Directory/resourceDirectory: .esapi/validation.properties
Not found in 'user.home' (/Users/athakur) directory: /Users/athakur/esapi/validation.properties
Loading validation.properties via file I/O failed.
Attempting to load validation.properties via the classpath.
validation.properties could not be loaded by any means. fail. Exception was: java.lang.IllegalArgumentException: Failed to load ESAPI.properties as a classloader resource.
SecurityConfiguration for ESAPI.printProperties not found in ESAPI.properties. Using default: false
SecurityConfiguration for Encryptor.CipherTransformation not found in ESAPI.properties. Using default: AES/CBC/PKCS5Padding
SecurityConfiguration for ESAPI.Encoder not found in ESAPI.properties. Using default: org.owasp.esapi.reference.DefaultEncoder
SecurityConfiguration for ESAPI.Logger not found in ESAPI.properties. Using default: org.owasp.esapi.reference.JavaLogFactory
SecurityConfiguration for Logger.LogApplicationName not found in ESAPI.properties. Using default: true
SecurityConfiguration for Logger.LogServerIP not found in ESAPI.properties. Using default: true
SecurityConfiguration for Logger.ApplicationName not found in ESAPI.properties. Using default: DefaultName
Tôi chắc chắn đây là những tệp có thể định cấu hình và các tệp khác. Ngoài ra tôi tìm thấy tập tin này trong -
https://github.com/OWASP/EJSF/blob/master/esapi_master_FULL/WebContent/ESAPI.properties
Các tập tin là khá lớn để dán nội dung của nó ở đây nhưng dựa trên các giá trị mặc định nó được thiết lập theo các bản ghi trên những điều sau đây được yêu cầu -
ESAPI.printProperties=true
Encryptor.CipherTransformation=AES/CBC/PKCS5Padding
ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder
# Log4JFactory Requires log4j.xml or log4j.properties in classpath - http://www.laliluna.de/log4j-tutorial.html
ESAPI.Logger=org.owasp.esapi.reference.Log4JLogFactory
# Determines whether ESAPI should log the application name. This might be clutter in some single-server/single-app environments.
Logger.LogApplicationName=true
# Determines whether ESAPI should log the server IP and port. This might be clutter in some single-server environments.
Logger.LogServerIP=true
# Set the application name if these logs are combined with other applications
Logger.ApplicationName=ExampleApplication
Nguồn
2017-03-08 08:00:47
Một [tìm kiếm web đơn giản] (https://www.owasp.org/index.php/ESAPI_Overview) cung cấp câu trả lời. Hãy làm nghiên cứu của bạn trước khi đăng bài ở đây. –
Cảm ơn. Nhưng nó vẫn không trả lời câu hỏi của tôi. Tôi có cần tự tạo ESAPI.properties không? Tôi nghĩ API cung cấp nhưng không thể tìm thấy nơi tôi có thể tải xuống tệp. – Pro