The Prophet ﷺ said, "Aslam, may Allah keep them safe, and Ghifar, may Allah forgive them."
حدثنا محمد بن بشار حدثنا عبد الرحمن بن مهدي حدثنا شعبة عن عبد الله بن دينار
عن النبي ﷺ قال أسلم سالمها الله وغفار غفر الله لها
[Its chain is sahih]. See no. 3941. There are also narrations on this topic from Abu Dharr [Muslim, no. 2514], Abu Barza Nadla bin Ubayd Aslami [Ahmad, 4/420, 424], Burayda [I did not find it], and Abu Hurairah [Bukhari, no. 3514, and Muslim, nos. 2515, 2516]. The hadith of Ali bin Hajar has already been mentioned at no. 3941.