mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
IJPL-162443 idea.log may contain our source code (sensitive data) from TextWithMnemonic with plugins like CodeGPT
GitOrigin-RevId: 6b15bdde38920452be2d5eaf5ea1dd29f13b3d4b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b567859bee
commit
15d2581c24
@@ -163,8 +163,14 @@ public final class TextWithMnemonic {
|
||||
String str = text.substring(pos + 1);
|
||||
|
||||
Exception error = null;
|
||||
if (str.isEmpty()) error = new IllegalArgumentException("unexpected mnemonic marker in " + text);
|
||||
if (str.indexOf(UIUtil.MNEMONIC) >= 0) error = new IllegalArgumentException("several mnemonic markers in " + text);
|
||||
// Don't write text in log to avoid possible sensitive information exposure
|
||||
String errorDetails = reportInvalidMnemonics ? " in text: " + text : "";
|
||||
if (str.isEmpty()) {
|
||||
error = new IllegalArgumentException("unexpected mnemonic marker" + errorDetails);
|
||||
}
|
||||
if (str.indexOf(UIUtil.MNEMONIC) >= 0) {
|
||||
error = new IllegalArgumentException("several mnemonic markers" + errorDetails);
|
||||
}
|
||||
|
||||
if (error != null) {
|
||||
if (reportInvalidMnemonics) {
|
||||
|
||||
Reference in New Issue
Block a user