Hue Jia Bao created NIFI-14133:
----------------------------------
Summary: [BUG] nifi.cmd unable to set username and password
Key: NIFI-14133
URL: https://issues.apache.org/jira/browse/NIFI-14133
Project: Apache NiFi
Issue Type: Bug
Components: Tools and Build
Affects Versions: 2.1.0
Environment: windows 10
Reporter: Hue Jia Bao
refer to
[https://github.com/apache/nifi/blob/main/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.cmd]
*line 49 set "CREDENTIALS={^}"%~2{^}" {^}"%~3{^}""*
I not able to set credentials with param 2 and param 3 with windows batch
script.
suggest to fix as below, directly pass in param without concatenate as new
param "{_}CREDENTIALS{_} "
code as below:
if %RUN_COMMAND% == "set-single-user-credentials" (
{color:#de350b}if "%~2"=="" ({color}
{color:#de350b}echo Error: Username cannot be empty.{color}
{color:#de350b}exit /b 1 {color}
{color:#de350b}){color}
{color:#de350b}if "%~3"=="" ({color}
{color:#de350b}echo Error: Password cannot be empty.{color}
{color:#de350b}exit /b 1 {color}
)
call "%JAVA_EXE%" %JAVA_PARAMS%
org.apache.nifi.authentication.single.user.command.SetSingleUserCredentials{color:#de350b}
%~2 %~3{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)