#1704 User cannot set personal folder prefix to ""

open
nobody
Folders (317)
5
2005-01-25
2005-01-25
Anonymous
No

As part of a mail migration, we've configured our
Squirrelmail (1.4.4)
installation with a default folder prefix of "mail/",
because this
matches the configuration of the legacy webmail server.

Unfortunatley, Squirrelmail prevents users from setting
their personal
folder_prefix option to "" because of code such as:

if (!isset($folder_prefix)) { $folder_prefix =
$default_folder_prefix; }

What we really need is a way to identify an option as
"set but empty",
thus allowing users to override the default. One
solution would be to
remove the above test from the general code path, and
only perform it
once -- when initializing the user preferences. This
would mean that
every user would have a "personal" folder_prefix
setting that would
initially be set to the value of $default_folder_prefix.

[lars@deas.harvard.edu]

Discussion

  • Jonathan Angliss

    Logged In: YES
    user_id=620333

    From http://php.net/isset

    $var = '';

    if (isset($var)) {
    echo 'This should appear';
    }

    The text should output, the $var /is/ set, it's just set to
    an empty string. This would suggest that the $folder_prefix
    shouldn't be reset to default_folder_prefix if it was being
    correctly saved in the options dialogs, regardless of the
    value. So this would suggest an error in the saving of the
    preference.

    As a side note, changing the folder_prefix can have odd
    results depening on your imap server, and your
    configurations. For example, if you allow your users to
    change the folder_prefix on courier-imap, and you have the
    default_folder_prefix set to "inbox.", and you allow them to
    set it to "" then you will generate errors on folder
    creation unless the user explicitly selects INBOX as the
    parent folder.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-08-04

    Logged In: YES
    user_id=225877

    SquirrelMail preference backends don't allow empty strings
    in settings. If value is empty, user setting is removed and
    interface reverts to default value. It can cause issues,
    when default setting value is not empty and empty string can
    be selected as setting value.

     
  • Nobody/Anonymous

    Logged In: NO

    What results if you set the prefix to "/" ?

    HWS

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-08-24

    Logged In: YES
    user_id=225877

    If you set it to full path or some path that uses '..',
    SquirrelMail won't accept it and will display INBOX.

    If user tries to set personal prefix to some path outside of
    his/her home directory, he or she is abusing UW IMAP server
    security.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks