From 58baabbd399efbdd9acb03d654a58c1909cdaffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 2 Dec 2021 03:11:19 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=82=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Home/Contact.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Home/Contact.php b/app/Http/Controllers/Home/Contact.php index 5db7e0d..ffbe00c 100644 --- a/app/Http/Controllers/Home/Contact.php +++ b/app/Http/Controllers/Home/Contact.php @@ -79,7 +79,7 @@ class Contact { Storage::disk('public')->put($filename, $this->field['gpg']); $path = Storage::disk('public')->path($filename); $verifygpg = explode("\n", $this->run('gpg --dry-run --import '.$path))[0]; - if (!str_contains($verifygpg, '処理数の合計: 1')) $err[] = $verifygpg; + if (!str_contains($verifygpg, '処理数の合計: 1') && !str_contains($verifygpg, 'Total number processed: 1')) $err[] = $verifygpg; } // 文章 @@ -106,6 +106,7 @@ class Contact { Mail::to(config('mail.from.address'))->send(new ContactNotifyMail($this->field, $filename)); } catch (\Throwable $e) { Storage::disk('public')->delete($filename); + $this->field['bunsyo'] = $gpg->decrypt($this->field['bunsyo']); Log::critical($e); return view('pages.site.contact', ['field' => $this->field, 'err' => ['送信に失敗しました。数時間後もう一回送信してみて下さい。']]); }