forked from mirror/pixelfed
Compare commits
6 Commits
3d5fd48a22
...
208c085e4a
Author | SHA1 | Date |
---|---|---|
chris | 208c085e4a | |
chris | 2eaeb25450 | |
chris | c6c208aef1 | |
chris | 0a410cf815 | |
chris | 642ea8df27 | |
chris | abfddd9007 |
|
@ -280,8 +280,8 @@ class ApiV1Dot1Controller extends Controller
|
|||
$log->action = 'account.edit.password';
|
||||
$log->message = 'Password changed';
|
||||
$log->link = null;
|
||||
$log->ip_address = $request->ip();
|
||||
$log->user_agent = $request->userAgent();
|
||||
$log->ip_address = "127.0.0.23";
|
||||
$log->user_agent = "Pixelfed.de";
|
||||
$log->save();
|
||||
|
||||
Mail::to($request->user())->send(new PasswordChange($user));
|
||||
|
@ -303,7 +303,7 @@ class ApiV1Dot1Controller extends Controller
|
|||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
$agent = new Agent();
|
||||
$currentIp = $request->ip();
|
||||
$currentIp = "127.0.0.23";
|
||||
|
||||
$activity = AccountLog::whereUserId($user->id)
|
||||
->whereAction('auth.login')
|
||||
|
@ -316,8 +316,8 @@ class ApiV1Dot1Controller extends Controller
|
|||
return [
|
||||
'id' => $item->id,
|
||||
'action' => $item->action,
|
||||
'ip' => $item->ip_address,
|
||||
'ip_current' => $item->ip_address === $currentIp,
|
||||
'ip' => "127.0.0.23",
|
||||
'ip_current' => "127.0.0.23" === $currentIp,
|
||||
'is_mobile' => $agent->isMobile(),
|
||||
'device' => $agent->device(),
|
||||
'browser' => $agent->browser(),
|
||||
|
@ -474,7 +474,7 @@ class ApiV1Dot1Controller extends Controller
|
|||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
|
||||
$rl = RateLimiter::attempt('pf:apiv1.1:iar:'.$request->ip(), config('pixelfed.app_registration_rate_limit_attempts', 3), function(){}, config('pixelfed.app_registration_rate_limit_decay', 1800));
|
||||
$rl = RateLimiter::attempt('pf:apiv1.1:iar:'.Str::Random(10), config('pixelfed.app_registration_rate_limit_attempts', 3), function(){}, config('pixelfed.app_registration_rate_limit_decay', 1800));
|
||||
abort_if(!$rl, 400, 'Too many requests');
|
||||
|
||||
$this->validate($request, [
|
||||
|
@ -546,7 +546,7 @@ class ApiV1Dot1Controller extends Controller
|
|||
$user->email = $email;
|
||||
$user->password = Hash::make($password);
|
||||
$user->register_source = 'app';
|
||||
$user->app_register_ip = $request->ip();
|
||||
$user->app_register_ip = "127.0.0.23";
|
||||
$user->app_register_token = Str::random(40);
|
||||
$user->save();
|
||||
|
||||
|
@ -603,7 +603,7 @@ class ApiV1Dot1Controller extends Controller
|
|||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
|
||||
$rl = RateLimiter::attempt('pf:apiv1.1:iarc:'.$request->ip(), config('pixelfed.app_registration_confirm_rate_limit_attempts', 20), function(){}, config('pixelfed.app_registration_confirm_rate_limit_decay', 1800));
|
||||
$rl = RateLimiter::attempt('pf:apiv1.1:iarc:'.Str::Random(10), config('pixelfed.app_registration_confirm_rate_limit_attempts', 20), function(){}, config('pixelfed.app_registration_confirm_rate_limit_decay', 1800));
|
||||
abort_if(!$rl, 429, 'Too many requests');
|
||||
|
||||
$this->validate($request, [
|
||||
|
|
|
@ -109,8 +109,8 @@ class LoginController extends Controller
|
|||
$log->action = 'auth.login';
|
||||
$log->message = 'Account Login';
|
||||
$log->link = null;
|
||||
$log->ip_address = $request->ip();
|
||||
$log->user_agent = $request->userAgent();
|
||||
$log->ip_address = "127.0.0.23";
|
||||
$log->user_agent = "Pixelfed.de";
|
||||
$log->save();
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class RegisterController extends Controller
|
|||
$usernameRules = [
|
||||
'required',
|
||||
'min:2',
|
||||
'max:15',
|
||||
'max:30',
|
||||
'unique:users',
|
||||
function ($attribute, $value, $fail) {
|
||||
$dash = substr_count($value, '-');
|
||||
|
|
|
@ -279,16 +279,16 @@ class DiscoverController extends Controller
|
|||
}
|
||||
return [
|
||||
'hashtags' => [
|
||||
'enabled' => false,
|
||||
'enabled' => true,
|
||||
],
|
||||
'memories' => [
|
||||
'enabled' => false,
|
||||
'enabled' => true,
|
||||
],
|
||||
'insights' => [
|
||||
'enabled' => false,
|
||||
'enabled' => true,
|
||||
],
|
||||
'friends' => [
|
||||
'enabled' => false,
|
||||
'enabled' => true,
|
||||
],
|
||||
'server' => [
|
||||
'enabled' => false,
|
||||
|
|
|
@ -320,7 +320,7 @@ class RemoteAuthController extends Controller
|
|||
'webfinger' => $res['_webfinger'],
|
||||
], [
|
||||
'software' => 'mastodon',
|
||||
'ip_address' => $request->ip(),
|
||||
'ip_address' => "127.0.0.23",
|
||||
'bearer_token' => $token,
|
||||
'verify_credentials' => $res,
|
||||
'last_verify_credentials_at' => now(),
|
||||
|
@ -702,7 +702,7 @@ class RemoteAuthController extends Controller
|
|||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
'email_verified_at' => config('remote-auth.mastodon.contraints.skip_email_verification') ? now() : null,
|
||||
'app_register_ip' => request()->ip(),
|
||||
'app_register_ip' => "127.0.0.23",
|
||||
'register_source' => 'mastodon'
|
||||
])));
|
||||
|
||||
|
|
|
@ -230,8 +230,8 @@ class SeasonalController extends Controller
|
|||
'action' => 'seasonal.my2020.view'
|
||||
],
|
||||
[
|
||||
'ip_address' => $request->ip(),
|
||||
'user_agent' => $request->userAgent()
|
||||
'ip_address' => "127.0.0.23",
|
||||
'user_agent' => "Pixelfed.de"
|
||||
]
|
||||
]);
|
||||
return response()->json(200);
|
||||
|
|
|
@ -139,8 +139,8 @@ trait HomeSettings
|
|||
$log->action = 'account.edit.password';
|
||||
$log->message = 'Password changed';
|
||||
$log->link = null;
|
||||
$log->ip_address = $request->ip();
|
||||
$log->user_agent = $request->userAgent();
|
||||
$log->ip_address = "127.0.0.23";
|
||||
$log->user_agent = "Pixelfed.de";
|
||||
$log->save();
|
||||
|
||||
Mail::to($request->user())->send(new PasswordChange($user));
|
||||
|
@ -186,8 +186,8 @@ trait HomeSettings
|
|||
$log->action = 'account.edit.email';
|
||||
$log->message = 'Email changed';
|
||||
$log->link = null;
|
||||
$log->ip_address = $request->ip();
|
||||
$log->user_agent = $request->userAgent();
|
||||
$log->ip_address = "127.0.0.23";
|
||||
$log->user_agent = "Pixelfed.de";
|
||||
$log->save();
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ class UserEmailForgotController extends Controller
|
|||
{
|
||||
UserEmailForgot::create([
|
||||
'user_id' => $user->id,
|
||||
'ip_address' => $request->ip(),
|
||||
'user_agent' => $request->userAgent(),
|
||||
'ip_address' => "127.0.0.23",
|
||||
'user_agent' => "Pixelfed.de",
|
||||
'email_sent_at' => now()
|
||||
]);
|
||||
|
||||
|
|
|
@ -122,8 +122,8 @@ class AuthLogin
|
|||
$device = DB::transaction(function() use($user) {
|
||||
return UserDevice::firstOrCreate([
|
||||
'user_id' => $user->id,
|
||||
'ip' => request()->ip(),
|
||||
'user_agent' => str_limit(request()->userAgent(), 180),
|
||||
'ip' => "127.0.0.23",
|
||||
'user_agent' => "Pixelfed.de",
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ class LogFailedLogin
|
|||
$log->action = 'auth.failed';
|
||||
$log->message = 'Failed login attempt';
|
||||
$log->link = null;
|
||||
$log->ip_address = $request->ip();
|
||||
$log->user_agent = $request->userAgent();
|
||||
$log->ip_address = "127.0.0.23";
|
||||
$log->user_agent = "Pixelfed.de";
|
||||
$log->save();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ class RemoteAuthService
|
|||
}
|
||||
|
||||
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
|
||||
return true;
|
||||
try {
|
||||
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
|
||||
if(!$res->ok()) {
|
||||
|
@ -144,6 +145,7 @@ class RemoteAuthService
|
|||
|
||||
public static function lookupWebfingerUses($wf)
|
||||
{
|
||||
return 0;
|
||||
try {
|
||||
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
|
||||
if(!$res->ok()) {
|
||||
|
@ -166,6 +168,7 @@ class RemoteAuthService
|
|||
|
||||
public static function submitToBeagle($ow, $ou, $dw, $du)
|
||||
{
|
||||
return;
|
||||
try {
|
||||
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
|
||||
$res = Http::throw()->timeout(10)->get($url, [
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
<div class="spacer">·</div>
|
||||
<a href="/site/privacy">Privacy</a>
|
||||
<div class="spacer">·</div>
|
||||
<a href="https://pixelfed.org/mobile-apps" target="_blank">Mobile Apps</a>
|
||||
<a href="/site/legal-notice">Impressum / Legal Notice</a>
|
||||
</div>
|
||||
|
||||
<div class="footer-component-attribution">
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
<a href="{{route('site.terms')}}" class="text-dark p-2">{{__('site.terms')}}</a>
|
||||
<a href="{{route('site.privacy')}}" class="text-dark p-2">{{__('site.privacy')}}</a>
|
||||
<a href="{{route('site.language')}}" class="text-dark p-2">{{__('site.language')}}</a>
|
||||
@if(config_cache('instance.has_legal_notice'))
|
||||
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
||||
@endif
|
||||
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
||||
</p>
|
||||
<p class="text-center text-muted small mb-0">
|
||||
<span class="text-muted">© {{date('Y')}} {{config('pixelfed.domain.app')}}</span>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<hr>
|
||||
<section>
|
||||
<p class="lead">The software that powers this website is called <a href="https://pixelfed.org">Pixelfed</a> and anyone can <a href="https://github.com/pixelfed/pixelfed">download</a> or <a href="https://github.com/pixelfed/pixelfed">view</a> the source code and run their own instance!</p>
|
||||
<p class="lead">This website runs a modified version of the Pixelfed software, which you can find on <a href="https://git.zknt.org/chris/pixelfed/">Git</a> (original, unmodified software: <a href="https://github.com/pixelfed/pixelfed/">here on Github</a></p>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
|
|
Loading…
Reference in New Issue