Example #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param CreateMessageRequest $request
  * @return Response
  */
 public function store(CreateMessageRequest $request)
 {
     $message = new Message();
     $message->fill($request->all());
     $message->save();
     Flash::info(trans('messages.message_sent_successfully'));
     return redirect()->back();
 }
 public function store(CreateMessageRequest $request)
 {
     $input = $request->all();
     //vulnerability #6 markdown vulnerable to XSS
     $message = new Message($input);
     Auth::user()->messages()->save($message);
     \Session::flash('flash_message', 'Your message has been posted!');
     return redirect('messages');
 }
 public function store(CreateMessageRequest $request)
 {
     $input = $request->all();
     $input['body'] = \Purifier::clean($input['body']);
     $input['body'] = \Html::entities($input['body']);
     $message = new Message($input);
     Auth::user()->messages()->save($message);
     \Session::flash('flash_message', 'Your message has been posted!');
     return redirect('messages');
 }