Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Publii is saving server passwords per server, not per website.

  • #9593
    Avatar photo[anonymous]

    Publii is saving server passwords for SFTP per-server and not per-website.

    This creates issues when you are publishing websites for different people hosted on the same server IP.

    #9810
    Avatar photo[anonymous]

    Hi,

    Are you sure? Publii uses to store unique ID related to website, so such issue shouldn’t appear. Maybe you have duplicated website manually and you have the same unique ID for both ones?

    #9821
    Avatar photo[anonymous]

    yep 100% sure.

    I did not duplicate the websites in anyway. They were both create from scratch with the UI.

    I can go to one website enter the username/password in the server settings and sync.

    Go to the next website and the user name is different, but the password is the same.

    Example: SiteA Sever 1.1.1.1 Username: Bob Password:Milk123
    Example SiteB server 1.1.1.1 Username: Jim Password:Egg123

    If I sync SiteA then when I got to SiteB the username will say Jim, but the password will be Bob’s Mil123 password. Then if I change it to Jim’s Egg123 password and sync that site and then go back to SiteA the user name is set to Bob but the password has been changed to Jim’s Egg123.

    In otherwords the password is being saved per-server address and not per user.

    My guess is the UniqueID being used is just the server name and not the server name + User.

    #9822
    Avatar photo[anonymous]

    I have tried to reproduce this issue, but I am unable to do it.

    Server address has nothing to do with it.

    Publii works in the following way:

    • Password is stored with key “publii SITE_UNIQUE_ID”
    • during loading server settings, Publii load passwords using “publii SITE_UNIQUE_ID”

    Password is changed only during saving server settings. There is no other situations where Publii changes the password in Keychain/Credential Manager/libsecret

    Maybe your websites are using the same unique ID? You can open under input/config/site.config.json file and check “uuid” value.

    Also please check if the same “replacement” occurs if you reopen the app – maybe we have some flaw in the UI, but at this moment I am unable to reproduce it.

    #9826
    Avatar photo[anonymous]

    Does seem like the unique ID is the same, but that seems odd since I have never duplicated a website in publii, mainly on account of not realizing I could while I was setting up the websites. It would have saved me a lot of time duplicating things, but I found out about that feature later.

    #9827
    Avatar photo[anonymous]

    Maybe you have just copied the website files and changed only a name? ID is regenerated during duplicating website or restoring it from backup.