SMF icon indicating copy to clipboard operation
SMF copied to clipboard

FTP Login Cookie

Open jasonclemons opened this issue 12 years ago • 9 comments

I noticed when trying to install a package lately that I accidentally input the wrong FTP details, and got the "The Packages directory is not writable" error, there is no way to go back and input the proper details without clearing the cookies from the browser.

Is there any way to fix this so as to delete the cookie if said error is triggered, and to allow the ability to re-enter the FTP details?

jasonclemons avatar Dec 10 '13 00:12 jasonclemons

What part of the details did you enter incorrectly?

Oldiesmann avatar Dec 10 '13 02:12 Oldiesmann

I entered the local path incorrectly. The actual FTP login (username, password, port, host) were all correct.

jasonclemons avatar Dec 10 '13 05:12 jasonclemons

Try going to Admin -> Main -> Package Manager -> File Permissions. Leave everything at "no change" and enter the correct path down at the bottom where it asks for FTP info and click "make changes". I don't know if that will work or not, but it's worth a shot. I don't know if that info is actually stored anywhere.

Oldiesmann avatar Dec 10 '13 16:12 Oldiesmann

Yup, the FTP details are stored in $modSettings - just not the password.

Arantor avatar Dec 10 '13 17:12 Arantor

Doesn't work without clearing the cookie first as the FTP login form is not shown if the cookie is set. The issue seems to stem from having an incorrect local path only, and the cookie is only set when using the FTP form while installing a package.

I haven't looked at the code because I've been at work, but I believe the path variable is held either as a cookie or session var. Not sure which.

This happens in 2.0 as well as 2.1.

Edit: Actually, I think it's the password that's stored as a cookie/session var, and the form will not be shown if all the FTP details are present. What harm would it be to ask for the password every time FTP is needed, similar to the way WordPress does?

jasonclemons avatar Dec 11 '13 04:12 jasonclemons

The password should be stored in session with everything else in $modSettings. The password will only exist for a short period (max 1 hour normally)

Arantor avatar Dec 11 '13 16:12 Arantor

I can't reproduce this issue. If I enter in invalid FTP credentials, the system takes me back and says invalid server.

jdarwood007 avatar Jul 15 '18 18:07 jdarwood007

@jasonclemons @jdarwood007 are you able to still reproduce this errors using the latest build?

MissAllSunday avatar Aug 22 '19 18:08 MissAllSunday

I'll go ahead and close this. Feel free to re-open it if the issue continues to happen with the current build

MissAllSunday avatar Sep 03 '19 16:09 MissAllSunday