The Prophet ﷺ forbade sitting between the sun and the shade.
عن النبي ﷺ: أنه نهى أن يقعد بين الشمس والظل.
No references are available.
Ibn Abu Shayba (25963) narrated it from Zayd bin Hubab, from Abu Munib, from Ibn Burayda, from his father, and mentioned it. Abu Munib is Ubaydullah bin Abdullah Ataki, about whom there is disagreement, though his hadith is hasan when he does not bring something that is criticized, as is the case in this hadith, and it is supported by reports from the companions.On this subject there is also what was narrated from Jabir, who said, the Messenger of Allah ﷺ forbade a man from sitting between shade and sun, and he said, "It is the sitting place of Satan." Ibn Adi narrated it in al-Kamil (4/1534) from Muhammad bin Abu Ali, who said, Miqdam bin Dawud told us, Abdullah bin Muhammad bin Mughira told us, Sufyan Thawri told us, Muhammad bin Munkadir told us, from Jabir, and he mentioned it.Ibn Adi said, I do not know of anyone who narrated this hadith with this chain from Thawri other than Abdullah bin Muhammad. He said, at the end of the biography of Abdullah bin Muhammad bin Mughira, these hadiths are from Malik bin Mughul, and most of the rest of his hadiths are ones not corroborated by anyone else, yet despite his weakness his hadith is written down.This is supported by the report from Ibn Umar, who said, "Sitting between shade and sun is the sitting place of Satan." Ibn Abu Shayba (25957) extracted it from Ghundar, from Shuba, from Mughira, from Shaybi, who said, I heard Abdullah bin Umar, and he mentioned it.It is likewise supported by the mursal report of Qatada from the Prophet ﷺ that he forbade a man from sitting between shade and sun. Ibn Abu Shayba (25958) extracted it from Waki, from Shuba, from Qatada, with this wording.