VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: fmarton on March 24, 2020, 12:29:54 PM

Title: Why are the database credentials in cart object?
Post by: fmarton on March 24, 2020, 12:29:54 PM
Hello Friends,
Can anyone tell me what is the reason for including clear text database username, name and password in the cart object?
(along with the logged in user's salted password)
using VirtueMart 3.6.10 10211
test: print_r($this->cart);
for example at the end of /web/components/com_virtuemart/views/cart/tmpl/default_pricelist.php
Thank you,
Title: Re: Why are the database credentials in cart object?
Post by: Milbo on March 24, 2020, 14:05:40 PM
It is in the db object. You do a debug output.
Title: Re: Why are the database credentials in cart object?
Post by: Studio 42 on March 24, 2020, 16:50:47 PM
@fmarton
This is not the user password, but the DB password.
Title: Re: Why are the database credentials in cart object?
Post by: fmarton on March 24, 2020, 18:45:00 PM
Like I said, it is the database name, database username and database password,
Additionally, there is also the user's name, e-mail address and salted password there, please see attachment.

I know I'm debugging. But that's not an answer to why it should be in the cart. :)

It would be nice to know if there is a good reason for that.
Thank you all!
Title: Re: Why are the database credentials in cart object?
Post by: Studio 42 on March 25, 2020, 01:58:50 AM
If you get Joomla user, you get the password in all cases, not only in Virtuemart.
The password is encoded.
If you mean that this is a problem, then check with Joomla team. Virtuemart only use Joomla user, it not set it.