The Hadith of Ibn Buhainah is a Hasan Hadith, and this is acted upon according to some of the people of knowledge. It is the opinion of Ash-Shafi'i, he held the view that all prostrations for As-Sahw were to be performed before the Salam, saying: "This one abrogates the other Ahadith" and he mentioned that the last action of the Prophet (ﷺ) was according to this.
Ahmad and Ishaq said: "When a man stands up after two Rak'ah, then he performs the prostrations for As-Sahw before the Salam according to the Hadith of Ibn Buhainah."
'Abdullah bin Buhainah is 'Abdullah bin Malik Ibn Buhainah (because) Malik is his father and Buhainah is his mother.
I was informed of this by Ishaq bin Mansur from 'Ali bin Al-Madini.
Abu 'Eisa said: The people of knowledge differ over when a man is to perform the prostrations of As-Sahw, is it before the Salam or after it. Some of them thought that her performs them after the Salam. This is the view of Sufyan Ath-Thawri and the people of Al-Kufah. Some of them said he performs them before the Salam. This is the view of most of the Fuqaha among the people of Al-Madinah, like Yahya bin Sa'eed, Rabi'ah, and others. This is also the saying of Ash-Shafi'i.
Some of them said when he adds to the Salat, then it is after the Salam, and when he leaves something out, then before the Salam. This is the view of Malik bin Anas.
Ahmad said: "Whatever is reported from the Prophet (ﷺ) about the prostrations from As-Sahw then it is acted upon in either case." He saw that when one stands after Rak'ah then according to the Hadith of Ibn Buhainah, he is to perform the prostrations before the Salam. When he prays five for Zuhr, then performs the prostrations after the Salam, and if he says Salam after two Rak'ahs of Zuhr or 'Asr then he performs the prostrations after the Salam. All of them are to be acted upon depending upon the case, and in the cases where nothing is reported from the Prophet (ﷺ), then two prostrations are performed for As-Sahw before the Salam.
Ishaq said the same as Ahmad about all of this, with the exception that he said that for every case of As-Sahw that is not mentioned from the Prophet (ﷺ), then if it is an addition to the Salat, then prostrations are performed after the Salam, and if it is something that was left out, then the prostrations are performed before the Salam.
Jami` at-Tirmidhi Book 2, Hadith 244
“Abu Bakr said: ‘O Messenger of Allah, command me with something that I may say when I reach morning and evening.’ He said: ‘Say: “O Allah Knower of the Unseen and the Seen, Originator of the heavens and the earth, Lord of everything and its Possessor, I bear witness that there is none worthy of worship except You, I seek refuge from You from the evil of my soul and from the evil of Shaitan and his Shirk (Allāhumma `ālimal-ghaibi wash-shahādati fāṭiras-samāwāti wal-arḍ, rabba kulli shai’in wa malīkahu, ash-hadu an lā ilāha illā anta, a`ūdhu bika min sharri nafsī wa min sharrish-shaiṭāni washirkihi).’” He said: ‘Say it when you reach morning, and evening, and when you go to bed.’”
Jami` at-Tirmidhi Book 48, Hadith 23
“When the emigrants who had
crossed
the sea came back to the Messenger of Allah (ﷺ), he said:
‘Why don’t
you tell me of the strange things that you saw in the
land of
Abyssinia?’ Some young men among them said: ‘Yes, O
Messenger of
Allah. While we were sitting, one of their elderly nuns
came past,
carrying a vessel of water on her head. She passed by some
of their
youth, one of whom placed his hand between her shoulders and
pushed
her. She fell on her knees and her vessel broke. When she
stood up,
she turned to him and said: “You will come to know, O
traitor, that
when Allah sets up the Footstool and gathers the first
and the last,
and hands and feet speak of what they used to earn, you
will come to
know your case and my case in His presence soon.’”
The Messenger of
Allah (ﷺ) said: ‘She spoke the truth, she spoke
the truth. How can
Allah purify any people (of sin) when they do not
support their weak
from their strong?’”
Sunan Ibn Majah Book 36, Hadith 85