Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2017-02-19 16:28:37 -0500
committerThomas Wolf2017-03-01 14:43:28 -0500
commit4bc15e7f9023024b9e1c803d185ed16730218931 (patch)
tree8a7d449e251ebfbdfea5f7ede7b57d176e2402de /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
parent7ac21ccc9faf0ff5fe9952391e311491f6952c53 (diff)
downloadegit-4bc15e7f9023024b9e1c803d185ed16730218931.tar.gz
egit-4bc15e7f9023024b9e1c803d185ed16730218931.tar.xz
egit-4bc15e7f9023024b9e1c803d185ed16730218931.zip
Prevent creation of invalid git config keys
Allow only alphanumeric characters and the dash in git config section and variable names. Subsections get quoted and may contain other characters. Extend the validation in AddConfigEntryDialog to prevent the accidental creation of invalid git config entries; those would break all git, JGit, and EGit functionality and the only way to fix this would be to edit the offending git config file manually in a text editor. With an invalid git config file, not even "git config --help" works! Change-Id: I65a3279069639d44922da8c8792a27b9aa51fe4e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties9
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
index 7546fd8e6..fc28db2b6 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
@@ -40,11 +40,12 @@ Activator_refreshFailed=Failed to refresh projects from index changes
Activator_setupFocusListener=Setting up the focus listener
AddConfigEntryDialog_AddConfigTitle=Add a configuration entry
AddConfigEntryDialog_ConfigKeyTooltip=Use "." to separate section/subsection/name, e.g. "core.bare", "remote.origin.url"
-AddConfigEntryDialog_DialogMessage=Please enter a key, e.g. "user.name" and a value
-AddConfigEntryDialog_EnterValueMessage=Please enter a value
-AddConfigEntryDialog_KeyComponentsMessage=The key must have two or more components separated by "."
+AddConfigEntryDialog_DialogMessage=Please enter a key, e.g. "user.name" and a value.
+AddConfigEntryDialog_EnterValueMessage=Please enter a value.
+AddConfigEntryDialog_InvalidKeyMessage=Please enter a valid key: the first and the last component may contain only the letters [A-Za-z0-9] or the dash, and the last component must start with a letter.
+AddConfigEntryDialog_KeyComponentsMessage=The key must have two or more components separated by ".".
AddConfigEntryDialog_KeyLabel=&Key
-AddConfigEntryDialog_MustEnterKeyMessage=Please enter a key
+AddConfigEntryDialog_MustEnterKeyMessage=Please enter a key.
AddConfigEntryDialog_ValueLabel=&Value
AddRemotePage_EnterRemoteNameMessage=Please enter a remote name
AddRemotePage_RemoteNameAlreadyExistsError=Remote already exists

Back to the top