Indian Penal Code, 1860
Section 228A Disclosure of identity of the victim of certain offences, etc
(1) Whoever prints or publishes the name or any matter which may make known the identity of any person against whom an offence under section 376, section 376A, section 376AB, section 376B, section 376C, section 376D, section 376DA, section 376DB or section 376E is alleged or found to have been committed (hereafter in this section referred to as the victim) shall be punished with imprisonment of either description for a term which may extend to two years and shall also be liable to fine.
(2) Nothing in sub-section (1) extends to any printing or publication of the name or any matter which may make known the identity of the victim if such printing or publication is—
(a) by or under the order in writing of the officer-in-charge of the police station or the police officer making the investigation into such offence acting in good faith for the purposes of such investigation; or
(b) by, or with the authorisation in writing of, the victim; or
(c) where the victim is dead or minor or of unsound mind, by, or with the authorisation in writing of, the next of kin of the victim:
Provided that no such authorisation shall be given by the next of kin to anybody other than the chairman or the secretary, by whatever name called, of any recognised welfare institution or organisation.
Explanation.—For the purposes of this sub-section, “recognised welfare institution or organisation” means a social welfare institution or organization recognised in this behalf by the Central or State Government.
(3) Whoever prints or publishes any matter in relation to any proceeding before a court with respect to an offence referred to in sub-section (1) without the previous permission of such court shall be punished with imprisonment of either description for a term which may extend to two years and shall also be liable to fine.
Explanation.—The printing or publication of the judgment of any High Court or the Supreme Court does not amount to an offence within the meaning of this section.
Bharatiya Nyaya Sanhita, 2023
Section 72 Disclosure of identity of victim of certain offences, etc
(1) Whoever prints or publishes the name or any matter which may make known the identity of any person against whom an offence under section 64 or section 65 or section 66 or section 67 or section 68 or section 69 or section 70 or section 71 is alleged or found to have been committed (hereafter in this section referred to as the victim) shall be punished with imprisonment of either description for a term which may extend to two years and shall also be liable to fine.
(2) Nothing in sub-section (1) extends to any printing or publication of the name or any matter which may make known the identity of the victim if such printing or publication is—
(a) by or under the order in writing of the officer-in-charge of the police station or the police officer making the investigation into such offence acting in good faith for the purposes of such investigation; or
(b) by, or with the authorisation in writing of, the victim; or
(c) where the victim is dead or a child or of unsound mind, by, or with the authorisation in writing of, the next of kin of the victim:
Provided that no such authorisation shall be given by the next of kin to anybody other than the chairman or the secretary, by whatever name called, of any recognised welfare institution or organisation.
Explanation.—For the purposes of this sub-section, “recognised welfare institution or organisation” means a social welfare institution or organisation recognised in this behalf by the Central Government or the State Government.
Bharatiya Nyaya Sanhita, 2023
Section 73 Printing or publishing any matter relating to Court proceedings without permission
Whoever prints or publishes any matter in relation to any proceeding before a Court with respect to an offence referred to in section 72 without the previous permission of such Court shall be punished with imprisonment of either description for a term which may extend to two years and shall also be liable to fine.
Explanation.—The printing or publication of the judgment of any High Court or the Supreme Court does not amount to an offence within the meaning of this section.