There's a famous news media here in my country that once posts an article about masturbation. It talked about masturbation is haram according for some scholars (and makruh for some scholars, or allowed/mubah in some condition). The interesting part is that it says the following (translated to english):
"Ibn Abbas (Sahabah) allows masturbation because muslims back then do it when fighting in a war (far from family). Even Mujahid (a student of Ibn Abbas) said that Prophet Muhammad PBUH tolerate it at that time. Mujahid also said that masturbation is not good for health because : ..... "
Did they really said that? I also know that Ibn Abbas said that masturbation was better than zina.