Skip to content

Commit 5fb2fab

Browse files
committed
Remove hardcoded authorization token from Updater to enhance security
1 parent 2813f41 commit 5fb2fab

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/io/nodelink/server/NodeLink.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public class NodeLink extends NodeLinkHelper {
1111

1212
static void main(String[] args) {
1313
try {
14+
NodeLink.getInstance().getUpdater().checkForUpdates();
15+
1416
for (int i = 0; i < args.length; i++) {
1517
if ("--delete-old".equals(args[i]) && (i + 1) < args.length) {
1618
String oldJarPath = args[i + 1];

src/main/java/io/nodelink/server/NodeLinkHelper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public static NodeLinkHelper getHelper() {
3131
}
3232

3333
public void INITIALIZE() {
34-
NodeLink.getInstance().getUpdater().checkForUpdates();
35-
3634
initTerminal();
3735
}
3836

@@ -57,7 +55,7 @@ private void initTerminal() {
5755
try {
5856
String command = reader.readLine(prompt);
5957

60-
if (command == null || command.equalsIgnoreCase("exit")) break;
58+
if (command == null || command.equalsIgnoreCase("exit")) System.exit(1);
6159

6260
if (command.equalsIgnoreCase("clear")) {
6361
fullClearAndRefresh(terminal);

0 commit comments

Comments
 (0)