Deposits/rents in advance

Just want to ask if it is still legal for landlords to ask for deposits and a month’s rent in advance?
I’m sure it has been passed in parliament that it is illegal, I’m I right or wrong?

Deposits up to the equivalent of 5 weeks are legal ( if the rent is really high there is a different cap)
If your contract reads rent in advance then you can take rent in advance,
Protect the deposit within 30 days of receipt with an appropriate protection service and serve the required documents ( certificate, T&C’s, prescribed information) to the tenants and keep evidence that they have received it ( eg signed term in contract).

still legal ,you are wrong

Where the heck have you seen that ?