You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yo, heads up- philter's new UI is behaving SUPER DANGEROUSLY around multiple accounts
I'm not 100% sure but it looks like it's storing what data file to use globally
it definitely just tried to use the datafile for phillectric while logged in as phillammon, which is not ideal
(classic ui works fine)
I tried to reproduce the issue, but could not. But I suspect it may be related to the way relay_Philter_Manager.js runs ZLib.
How we use ZLib
When ocd-cleanup.ash is run for the first time, it sets the default value of BaleOCD_DataFile (a ZLib variable) to the current player's name. Let's say alice.
ZLib stores this default value in data/vars_defaults.txt, which is then used across all of your accounts.
If you login as bob, your BaleOCD_DataFile would still be alice until you change it.
How ZLib works
ZLib manages two maps, vars and vardefaults.
vars is a global variable. It is loaded whenever ZLib is invoked, so it should be "fresh".
vardefaults is a static global variable. It is loaded when ZLib is invoked for the first time (per character), so it could become stale. But I cannot find evidence that it actually does go stale.
What happens when Philter Manager saves your config
relay_Philter_Manager.js calls _update_Zlib_vars() with the new config values:
updatevars() compares vars and vardefaults and writes the difference to data/vars_<username>.txt
// writes local vars map
boolean updatevars() {
string[string] newvars;
foreach pref,val in vars { // won't need this laterif (vardefaults contains pref && val == vardefaults[pref].val) continue;
newvars[pref] = val;
}
returnmap_to_file(newvars,"vars_"+replace_string(my_name(),"","_")+".txt");
}
The text was updated successfully, but these errors were encountered:
Original report copied from the ASS discord:
I tried to reproduce the issue, but could not. But I suspect it may be related to the way
relay_Philter_Manager.js
runs ZLib.How we use ZLib
ocd-cleanup.ash
is run for the first time, it sets the default value ofBaleOCD_DataFile
(a ZLib variable) to the current player's name. Let's sayalice
.data/vars_defaults.txt
, which is then used across all of your accounts.If you login as
bob
, yourBaleOCD_DataFile
would still bealice
until you change it.How ZLib works
ZLib manages two maps,
vars
andvardefaults
.vars
is a global variable. It is loaded whenever ZLib is invoked, so it should be "fresh".vardefaults
is a static global variable. It is loaded when ZLib is invoked for the first time (per character), so it could become stale. But I cannot find evidence that it actually does go stale.What happens when Philter Manager saves your config
relay_Philter_Manager.js
calls_update_Zlib_vars()
with the new config values:philter/packages/api/src/controllers/philter-config.ts
Lines 60 to 71 in 5ee1132
_update_Zlib_vars()
updatesvars
ifgetvar(config)
is different from the new value. <-- Could this be the cause? 👀Then it calls
updatevars()
:philter/release/relay/philter-manager-classic/philter.util.ash
Lines 55 to 66 in 5ee1132
updatevars()
comparesvars
andvardefaults
and writes the difference todata/vars_<username>.txt
The text was updated successfully, but these errors were encountered: