HR should be barred to ask candidates CTC because when they mention in the offer letter to keep it confidential. Candidates should take strict action and not to mention their CTC to other company HR
I would abide this condition and also despair it on the basis where a HR is actually handling the candidates personality and character so it's fair asking the candidate for the ctc.