Skip to content

Instantly share code, notes, and snippets.

Tejas Kanani tejaskanani

Block or report user

Report or block tejaskanani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tejaskanani
tejaskanani / LRDXP_get_theme_path_in_freemarker_template
Created May 31, 2017
Liferay DXP/7 : Get theme path in Freemarker template
View LRDXP_get_theme_path_in_freemarker_template
<#assign theme_images_complete_path = request['theme-display']['path-theme-images']>
<#assign theme_images_path = httpUtil.getPath(theme_images_complete_path)>
<#assign theme_path = theme_images_path?keep_before("/images")>
@tejaskanani
tejaskanani / Liferay security APIs List - LR 7.0
Created Sep 16, 2016
Liferay security APIs List - LR 7.0
View Liferay security APIs List - LR 7.0
HtmlUtil - to prevent XSS
HtmlUtil#escapeXPath - prevent XPath injection
AuthTokenUtil#checkCSRFToken - check CSRF tokens
FileUtil#createTempFile* - prevent file system related issues
PortalUtil#escapeRedirect - prevent open redirects
StringUtil#random* - insecure but random enough strings
PwdGenerator#getPassword, SecureRandomUtil – cryptographically strong pseudorandom output, optimized for performance
PasswordEncryptorUtil - verification and creation of strong password hashes, configured to use PBKDF2 by default
DigesterUtil - SHA-1 hashes, nowadays usable at most for file checksums
You can’t perform that action at this time.