tags 341154 + patch
thanks

Hello

On Mon, Nov 28, 2005 at 09:44:15PM +0100, Manu Benoît wrote:
> Le Lundi 28 Novembre 2005 21:32, Ola Lundqvist a écrit :
> > Hello
> >
> > On Mon, Nov 28, 2005 at 08:19:23PM +0100, Manu Benoît wrote:
> > > Package: wwwconfig-common
> > > Version: 0.0.43
> > >
> > > wwwconfig will not be able to connect to a MySQL server if the root
> > > password contains a quote.
> > >
> > > The problem comes from line 37 in /usr/share/wwwconfig-common/mysql.get :
> > >
> > >     passopt="--password='$dbadmpass'"
> > >
> > > It can be fixed by replacing this line with:
> > >
> > >     passopt="--password='"`echo "$dbadmpass" | sed -e
> > > "s/'/'"'"'"'"'"'"'/"`"'"
> >
> > There are more caracters that are a problem...
> 
> Well, as long as they are within single quote, they shouldn't be a problem 
> but 
> I could be mistaken.
> 
> > I can understand this line in principle but how do this help really?
> 
> The original line produces something like --pasword='something' (if the 
> password is "something"); therefore, if the password contains quotes, passopt 
> will contain --pasword='some'thing', therefore the MySQL command will be 
> invalid.
> 
> My replacement modifies this in order to produce --pasword='some'"'"'thing'; 
> the password is still inside single quotes, except for the quotes themselves.
> 
> Now, I just noticed that there's a bug with my fix, I forgot a 'g' at the end 
> of the sed command (the current one would only fix the first single quote).
> 
> passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"

Ok thanks for the explanation.

Regards,

// Ola

> >
> > Regards,
> >
> > // Ola
> 
> Best regards,
> 
> -- 
> *** Manu Benoît (TSeeker) * I sense much beer in you. Beer leads to *
> ** [EMAIL PROTECTED] *   intoxication, intoxication leads to  **
> * OpenPGP key: 0x591BF2C2 * hangover. Hangover leads to sobering. ***
> 
> 

-- 
 --------------------- Ola Lundqvist ---------------------------
/  [EMAIL PROTECTED]                     Annebergsslingan 37      \
|  [EMAIL PROTECTED]                 654 65 KARLSTAD          |
|  +46 (0)54-10 14 30                  +46 (0)70-332 1551       |
|  http://www.opal.dhs.org             UIN/icq: 4912500         |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to