legacy-knowledge-base
Publicado Jul. 25, 2002

How to implement a custom antivirus scanner

written-by

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

Environment

  • DXP 7.3

Resolution

  • You need to create a war hook (here's an article on war hooks: https://help.liferay.com/hc/en-us/articles/360018170611-WAR-Hook-Template)
  • Don't put any antivirus-specific properties in your portal-ext.properties file (the war-hook module will contain the necessary properties)
  • Please find attached such a war hook proof-of-concept, which you can test with these steps:

                  1. Start your 7.3 fp1 server and wait until it is fully up.
                  2. Copy the my-war-hook.war app to your deploy folder.
                  3. Log in to the server and try to upload a file to documents and media.
                  Result:
                  The console log should show you:

2021-06-10 18:09:05.396 INFO  [fileinstall-directory-watcher][BundleStartStopLogger:46] STARTED my-war-hook_7.3.10.1 [1651]
* antivirus scanner works: This is the scan file method *

Additional Information

 

did-this-article-resolve-your-issue

legacy-knowledge-base