lbry.com/view/template/acquisition/youtube_edit.php
maximest-pierre 23d309dc54 Fix xss
2018-03-22 09:47:00 -04:00

12 lines
457 B
PHP

<?php
$status_token = Request::encodeStringFromUser($_POST['status_token']);
$channel_name = Request::encodeStringFromUser($_POST['new_preferred_channel']);
$email = Request::encodeStringFromUser($_POST['new_email']);
$sync_consent = isset($_POST['sync_consent']);
if(!preg_match("/@[A-Za-z0-9_-]+$/", $channel_name)){
$channel_name = "@" . $channel_name;
}
AcquisitionActions::actionYoutubeEdit($status_token, $channel_name, $email, $sync_consent);