I asked Umar bin Khattab, "Regarding the verse 'There is no blame upon you if you shorten the prayer when you fear that those who disbelieve may attack you' [Nisa 4:101], Allah has now made the people safe."Umar replied, "I wondered about the same thing that puzzles you, so I asked the Messenger of Allah ﷺ about it, and he said, 'It is a charity that Allah has bestowed upon you, so accept His charity.'"
حدثنا ابن إدريس أنبأنا ابن جريج عن ابن أبي عمار عن عبد الله بن بابيه
سألت عمر بن الخطاب قلت {ليس عليكم جناح أن تقصروا من الصلاة إن خفتم أن يفتنكم الذين كفروا} وقد أمن الله الناس فقال لي عمر عجبت مما عجبت منه فسألت رسول الله ﷺ عن ذلك فقال صدقة تصدق الله بها عليكم فاقبلوا صدقته
Its chain of transmission is sahih. Ibn Idris is Abdullah bin Idris Awdi. Ibn Abu Ammar is Abdul-Rahman bin Abdullah bin Abu Ammar Qurashi Makki, who was nicknamed al-Qass for his devotion to worship. He is the one connected to the well-known story with Salamah, and he is trustworthy. Abdullah bin Babayh is trustworthy.The hadith was narrated by Muslim and the compilers of the Sunan, and Tirmidhi graded it sahih. See Tafsir Ibn Kathir 2/557–558, and see the hadith of Ibn Abbas, 1852.