* HTML cleaned up a bit
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 3 Mar 2001 16:20:31 +0000 (16:20 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 3 Mar 2001 16:20:31 +0000 (16:20 +0000)
commita4fe5de0ec975f32047a77f7b08472cd077a8dc3
treeecfafdcab3dd9606a149f669953f8e75d7e6f294
parent5729a6c1131f357eb99bfc6a91ced8a69ff585d1
* HTML cleaned up a bit
* Allows for multiple attachments, guaranteed.

Apparently, GenerateRandomString was producing the exact same string for a
second file attached.  This would of course overwrite the currently existing
attachment in both the $attachments array and on disk.  The first one would
be gone.

The code (two lines) fixes this by checking if that $localfilename is
already defined in $attachments, and will generate a new $localfilename if
it does.

What I can't figure out is how in the world did GenerateRandomString produce
the exact same string with two completely different page requests.  We
generate a key based on the time, remote user's information, and Apache's
unique ID that it sends along.  Also, it was supposed to generate 32
characters of lowercase, uppercase, and numbers.  That creates a string with
62^32 different possibilities.  That seems pretty wide open, but apparently
it caused problems.  Well, problems are solved now by simply checking if the
string was used already.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1162 7612ce4b-ef26-0410-bec9-ea0150e637f0
src/compose.php