You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/03 14:26:00 UTC

[jira] [Closed] (OFBIZ-13636) Use SecureRandom to generate promo codes, captcha codes and generated IDs

     [ https://issues.apache.org/jira/browse/OFBIZ-13636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak closed OFBIZ-13636.
---------------------------------
    Fix Version/s: Upcoming Branch
                   24.09.08
       Resolution: Fixed

> Use SecureRandom to generate promo codes, captcha codes and generated IDs
> -------------------------------------------------------------------------
>
>                 Key: OFBIZ-13636
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13636
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/base, framework/common, framework/webapp, product
>    Affects Versions: Upcoming Branch, 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>             Fix For: Upcoming Branch, 24.09.08
>
>
> {{PromoServices}}, {{CommonEvents}} (captcha), {{UtilHttp}} and {{OfbizPathShortener}} generate random strings with {{org.apache.commons.lang.RandomStringUtils}}, which uses {{java.util.Random}}. Related to open CodeQL alerts.
> h3. Proposal
> * Add a small helper that builds a random string from a given character set with a {{SecureRandom}}, and use it in the four places.
> * This follows the approach already used for the password salt in {{HashCrypt}}.
> h3. Release branch
> release24.09 has the same code. A backport is planned.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)