Hadithcore
Mishkat al-Masabih, 2101

Ibn ‘Umar said that when ‘Umar consulted the Prophet (ﷺ) about a vow he had made in the pre-Islamic period to spend a night in devotion in the sacred mosque, he said, “Fulfill your vow.” (Bukhari and Muslim.)

وَعَنِ ابْنِ عُمَرَ: أَنَّ عُمَرَ سَأَلَ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: " كُنْتُ نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِد الْحَرَام؟ قَالَ: «فأوف بِنَذْرِك»

References1 variant
In-Book Reference
Book 7, Hadith 142