You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "epugh (via GitHub)" <gi...@apache.org> on 2024/02/24 18:47:32 UTC
[PR] SOLR-16780: Prevent ZK subcommands from being run without the bin/solr zk prefix [solr]
epugh opened a new pull request, #2297:
URL: https://github.com/apache/solr/pull/2297
https://issues.apache.org/jira/browse/SOLR-16780
# Description
bin/solr cp would run, but the params wouldn't be properly formatted and you get an error.
# Solution
Trap the use of the zk subcommands and give user appropriate message.
# Tests
Bats
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16780: Prevent ZK subcommands from being run without the bin/solr zk prefix [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #2297:
URL: https://github.com/apache/solr/pull/2297
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16780: Prevent ZK subcommands from being run without the bin/solr zk prefix [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #2297:
URL: https://github.com/apache/solr/pull/2297#discussion_r1501697688
##########
solr/bin/solr:
##########
@@ -873,6 +873,12 @@ if [[ "$SCRIPT_CMD" == "delete" ]]; then
exit $?
fi
+# Prevent any zk subcommands from going through with out invoking zk command
+if [[ "$SCRIPT_CMD" == "upconfig" || $SCRIPT_CMD == "downconfig" || $SCRIPT_CMD == "cp" || $SCRIPT_CMD == "rm" || $SCRIPT_CMD == "mv" || $SCRIPT_CMD == "ls" || $SCRIPT_CMD == "mkroot" ]]; then
Review Comment:
Yeah, I did not like it. main is shell and sub commands are java... so thats why `bin/solr cp` actually is executed in java code. Now, if we move this all over to more how the `bin/solr package <subcommand>` then we wouldn't need this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16780: Prevent ZK subcommands from being run without the bin/solr zk prefix [solr]
Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #2297:
URL: https://github.com/apache/solr/pull/2297#discussion_r1501697310
##########
solr/bin/solr:
##########
@@ -873,6 +873,12 @@ if [[ "$SCRIPT_CMD" == "delete" ]]; then
exit $?
fi
+# Prevent any zk subcommands from going through with out invoking zk command
+if [[ "$SCRIPT_CMD" == "upconfig" || $SCRIPT_CMD == "downconfig" || $SCRIPT_CMD == "cp" || $SCRIPT_CMD == "rm" || $SCRIPT_CMD == "mv" || $SCRIPT_CMD == "ls" || $SCRIPT_CMD == "mkroot" ]]; then
Review Comment:
Feels a bit of duplication, for every sub command of any command we need to add it here to forbid it?
Cannot this be handled in SolrCLI, or is the main-command handled by shell and sub-commands by Java?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org