weechat-xmpp icon indicating copy to clipboard operation
weechat-xmpp copied to clipboard

secure data `${sec.data.mypass}` not taken into account in conf

Open blob42 opened this issue 2 months ago • 4 comments

Hi,

Does weechat relay the unencrypted password at runtime are is the config file manually parsed ? Because the secure data syntax does not work

blob42 avatar Oct 27 '25 11:10 blob42

thought it did https://github.com/bqv/weechat-xmpp/blob/cb51f45bb7fa36953b667feffbc8f6f13ebb908f/config/file.hh#L49-L50 I cant really see anything that the plugin should do for sec data to work https://weechat.org/files/doc/weechat/stable/weechat_plugin_api.en.html#configuration_files (see other sections there where they mention variable parsing in the config file, to my understanding that'd all be automagic from the weechat side)

might look into it at some point but it'll probably be quite a rabbithole again

Ckath avatar Nov 02 '25 19:11 Ckath

correction. it seems there is some manual action to parse these. probably best to do this transparent to actually reading and writing the file so it'll write back the variables unexpanded. how to expand them seems to be a single function: https://weechat.org/files/doc/weechat/stable/weechat_plugin_api.en.html#_string_eval_expression

probably fine to do it right before/at login for only user and password?

Ckath avatar Nov 03 '25 17:11 Ckath

jid is used allover the place and I cannot be bothered. pass is easy enough to pass through it to solve your usecase

Ckath avatar Nov 04 '25 19:11 Ckath

Thanks @Ckath for looking into this. Yes handling login pass would be more than enough

blob42 avatar Nov 05 '25 01:11 blob42