- if (answer.equals(RemoteLibrary.hashKey(key, random))) {
- action.send(true);
- } else {
- getTraceHandler().trace("Key rejected.");
- return null;
+ rw = Instance.getConfig().getBoolean(Config.SERVER_RW, rw);
+ if (!subkey.isEmpty()) {
+ List<String> allowed = Instance.getConfig().getList(
+ Config.SERVER_ALLOWED_SUBKEYS);
+ if (allowed.contains(subkey)) {
+ if ((subkey + "|").contains("|rw|")) {
+ rw = true;
+ }
+ if ((subkey + "|").contains("|wl|")) {
+ wl = false; // |wl| = bypass whitelist
+ whitelist = new ArrayList<String>();
+ }
+ }
+ }
+
+ String mode = display(wl, rw);
+
+ String trace = mode + "[ " + command + "] ";
+ for (Object arg : args) {
+ trace += arg + " ";