PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 All 254 releases
give / src / Log / Migrations / RemoveSensitiveLogs.php

RemoveSensitiveLogs.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at src/Log/Migrations/RemoveSensitiveLogs.php

53 lines 956 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Give\Log\Migrations;
6
7 use Give\Framework\Database\DB;
8 use Give\Framework\Migrations\Contracts\Migration;
9 use Give\Log\Log;
10
11 /**
12 * Removes logs that contain sensitive information.
13 *
14 * @since 2.20.0
15 */
16 class RemoveSensitiveLogs extends Migration
17 {
18 /**
19 * @inheritdoc
20 */
21 public static function id(): string
22 {
23 return 'remove_sensitive_logs';
24 }
25
26 /**
27 * @inheritdoc
28 */
29 public static function title(): string
30 {
31 return 'Remove logs wth sensitive information';
32 }
33
34 /**
35 * @inheritdoc
36 */
37 public static function timestamp()
38 {
39 return strtotime('2022-05-04');
40 }
41
42 /**
43 * @inheritdoc
44 */
45 public function run()
46 {
47 $tableName = DB::prefix('give_log');
48 $redactions = implode('|', Log::getRedactionList());
49
50 DB::query(" DELETE FROM $tableName WHERE data REGEXP '$redactions' ");
51 }
52 }
53