Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23.03.02 #661

Merged
merged 24 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ed2082e
Update header.blade.php (#610)
syahransaputra Jan 13, 2023
33c111d
Mutakhirkan catatan rilis
yogiperdana Jan 13, 2023
6dc687f
Perbaiki panjang slug prosedur (#606)
yogiperdana Jan 14, 2023
16f9c31
Perbaiki validasi prosedur (#616)
yogiperdana Jan 16, 2023
39ab6b4
Perbaiki jika camat belum diisi (#623)
yogiperdana Jan 31, 2023
8d2c426
Custom error 500 (#621)
yogiperdana Feb 1, 2023
c226dd7
Resolve conflict
yogiperdana Feb 1, 2023
844f565
perbaiki eror menu keluarga (#627)
scqolbu24 Feb 7, 2023
88fd179
Fix demo data #628 (#631)
esyede Feb 12, 2023
82354e0
Mutakhirkan catatan rilis
yogiperdana Feb 12, 2023
89b459f
Perbaiki sambutan camat kosong (#642)
yogiperdana Feb 27, 2023
aa98b57
Perbaiki preview gambar slider (#644)
yogiperdana Feb 27, 2023
866b97d
Perbaiki halaman sejarah (#645)
yogiperdana Feb 27, 2023
d52075a
Security artikel (#649)
yogiperdana Mar 1, 2023
6e8bf12
Merge branch 'master' into dev
yogiperdana Mar 1, 2023
83de156
Perbaiki slider tidak bisa lebih dari 4 (#646)
yogiperdana Mar 6, 2023
5ba51ac
Buat validasi file valid (#651)
yogiperdana Mar 6, 2023
3fd1d13
Perbaiki validasi file prosedur (#653)
yogiperdana Mar 11, 2023
ef1eec2
Perbaiki form validasi regulasi (#655)
yogiperdana Mar 11, 2023
cb6d550
Perbaiki validasi form potensi (#656)
yogiperdana Mar 11, 2023
edcdc2b
Perbaiki validasi form dokumen (#657)
yogiperdana Mar 11, 2023
21984dd
Perbaiki form validasi pengurus (#654)
yogiperdana Mar 11, 2023
d48ee7b
Perbaiki validasi form keluhan (#658)
yogiperdana Mar 11, 2023
14d9c90
Rilis 22.03.02
yogiperdana Mar 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
use App\Models\Program;
use App\Models\SettingAplikasi;
use App\Models\SinergiProgram;
use App\Models\Slide;
use App\Models\TipePotensi;
use Exception;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
Expand Down Expand Up @@ -93,6 +94,32 @@ public function __construct()
$navdesa = DataDesa::all();
$navpotensi = TipePotensi::orderby('nama_kategori', 'ASC')->get();
$pengurus = Pengurus::status()->get();
$slides = Slide::orderBy('created_at', 'DESC')->get();

if (count($slides) < 1) {
$slides = collect([
(object) [
'judul' => 'Pantai Garassikang',
'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan',
'gambar' => '/slide/slide-1.png',
],
(object) [
'judul' => 'Batu Siping',
'deskripsi' => 'Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan',
'gambar' => '/slide/slide-2.png',
],
(object) [
'judul' => 'Bukit Sinalu Bulu Jaya',
'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan',
'gambar' => '/slide/slide-3.png',
],
(object) [
'judul' => 'Pantai Tamarunang',
'deskripsi' => 'Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan',
'gambar' => '/slide/slide-4.png',
],
]);
}

View::share([
'profil' => $this->profil,
Expand All @@ -106,6 +133,7 @@ public function __construct()
'navpotensi' => $navpotensi,
'camat' => $this->nama_camat,
'pengurus' => $pengurus->sortBy('jabatan.jenis'),
'slides' => $slides,
]);
}

Expand Down
16 changes: 8 additions & 8 deletions app/Http/Controllers/SistemKomplain/SistemKomplainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ public function store(Request $request)
try {
$validator = Validator::make($request->all(), [
'nik' => 'required|numeric|nik_exists:' . $request->input('tanggal_lahir'),
'judul' => 'required',
'judul' => 'required|string|max:255',
'kategori' => 'required',
'laporan' => 'required',
'laporan' => 'required|string',
'captcha' => 'required|captcha',
'tanggal_lahir' => 'password_exists:' . $request->input('nik'),
'lampiran1' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024',
'lampiran2' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024',
'lampiran3' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024',
'lampiran4' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024',
'lampiran1' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024|valid_file',
'lampiran2' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024|valid_file',
'lampiran3' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024|valid_file',
'lampiran4' => 'file|mimes:jpeg,png,jpg,gif,svg|max:1024|valid_file',
], [
'captcha.captcha' => 'Invalid captcha code.',
'nik_exists' => 'NIK tidak ditemukan atau NIK dan Tanggal Lahir tidak sesuai.',
Expand Down Expand Up @@ -206,9 +206,9 @@ public function update(Request $request, $id)
{
request()->validate([
'nik' => 'required|numeric',
'judul' => 'required',
'judul' => 'required|string|max:255',
'kategori' => 'required',
'laporan' => 'required',
'laporan' => 'required|string',
], ['captcha.captcha' => 'Invalid captcha code.']);

try {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/ArtikelRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function rules()
'judul' => 'required|string|max:191',
'isi' => 'required',
'status' => 'required',
'gambar' => 'nullable|image|mimes:jpg,jpeg,png|max:1024',
'gambar' => 'nullable|image|mimes:jpg,jpeg,png|max:1024|valid_file',
];
}
}
4 changes: 2 additions & 2 deletions app/Http/Requests/DokumenRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function authorize()
public function rules()
{
return [
'nama_dokumen' => 'required',
'file_dokumen' => 'file|mimes:jpeg,png,jpg,gif,svg,xlsx,xls,doc,docx,pdf,ppt,pptx|max:2048',
'nama_dokumen' => 'required|string|max:255',
'file_dokumen' => 'file|mimes:jpeg,png,jpg,gif,svg,xlsx,xls,doc,docx,pdf,ppt,pptx|max:2048|valid_file',
];
}
}
2 changes: 1 addition & 1 deletion app/Http/Requests/PengurusRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function rules()
}

return [
'foto' => 'nullable|image|mimes:jpg,jpeg,png|max:1024',
'foto' => 'nullable|image|mimes:jpg,jpeg,png|max:1024|valid_file',
'nama' => "required|regex:/^[a-zA-Z '\.,\-]+$/|max:150",
'gelar_depan' => "nullable|regex:/^[a-zA-Z '\.,\-]+$/|max:150",
'gelar_belakang' => "nullable|regex:/^[a-zA-Z '\.,\-]+$/|max:150",
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Requests/PotensiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function rules()
{
return [
'kategori_id' => 'required',
'nama_potensi' => 'required',
'deskripsi' => 'required',
'file_gambar' => 'file|mimes:bmp,jpg,jpeg,gif,png|max:1024',
'nama_potensi' => 'required|string|max:200',
'deskripsi' => 'required|string',
'file_gambar' => 'file|mimes:bmp,jpg,jpeg,gif,png|max:1024|valid_file',
];
}
}
2 changes: 1 addition & 1 deletion app/Http/Requests/ProsedurRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function rules()
{
return [
'judul_prosedur' => 'required|string|min:5|max:150',
'file_prosedur' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048',
'file_prosedur' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048|valid_file',
];
}
}
6 changes: 3 additions & 3 deletions app/Http/Requests/RegulasiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function rules()
{
return [
'tipe_regulasi' => 'required',
'judul' => 'required',
'deskripsi' => 'required',
'file_regulasi' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048',
'judul' => 'required|string|max:200',
'deskripsi' => 'required|string',
'file_regulasi' => 'file|mimes:jpg,jpeg,png,gif,pdf|max:2048|valid_file',
];
}
}
13 changes: 13 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
Expand All @@ -55,6 +56,7 @@ public function boot()
$this->penduduk();
$this->config();
$this->blade();
$this->file();
}

protected function penduduk()
Expand Down Expand Up @@ -174,6 +176,17 @@ protected function blade()
});
}

protected function file()
{
Validator::extend('valid_file', function ($attributes, $value, $parameters) {
$contains = preg_match('/<\?php|<script|function|__halt_compiler|<html/i', File::get($value));
if ($contains) {
return false;
}
return true;
});
}

/**
* Register any application services.
*
Expand Down
21 changes: 13 additions & 8 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#### [v23.03.01]
#### [v23.03.02]

Di rilis v23.03.01 berisi perbaikan yang diminta Komunitas OpenDK.
Di rilis v23.03.02 berisi perbaikan yang diminta Komunitas OpenDK.

#### Perbaikan bug

1. [#626](https://github.com/OpenSID/OpenDK/issues/626) Perbaikan eror menu keluarga.
2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo.
3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaikan sambutan camat kosong
4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaikan preview gambar slider
5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaikan pengisian kolom sejarah.
6. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel.
1. [#638](https://github.com/OpenSID/OpenDK/issues/638) Perbaiki slider tidak bisa lebih dari 4.

#### Teknis

1. [#2089](https://github.com/OpenSID/premium/issues/2089) Audit keamanan validasi saat unggah gambar di artikel.
2. [#2114](https://github.com/OpenSID/premium/issues/2114) Audit keamanan form prosedur.
3. [#2115](https://github.com/OpenSID/premium/issues/2115) Audit keamanan form regulasi.
4. [#2116](https://github.com/OpenSID/premium/issues/2116) Audit keamanan form potensi.
5. [#2118](https://github.com/OpenSID/premium/issues/2118) Audit keamanan form dokumen.
6. [#2121](https://github.com/OpenSID/premium/issues/2121) Audit keamanan form pengurus.
7. [#2124](https://github.com/OpenSID/premium/issues/2124) Audit keamanan form keluhan.
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
|--------------------------------------------------------------------------
*/

'version' => 'v23.03.01',
'version' => 'v23.03.02',

/*
|--------------------------------------------------------------------------
Expand Down
Loading