README_LEARNDASH_LIB_HACKS.txt
6.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
tcpdf - 6.6.2
LearnDash 4.5.2
File tcpdf/tcpdf.php
Function: getHtmlDomArray()
Description of changes: Added condition wrapper around line 16516 to prevent replacing multiple spaces with a single space.
Original:
$html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space
Changed:
if ( ( ! defined( 'LEARNDASH_TCPDF_LEGACY_LD322' ) ) || ( true !== LEARNDASH_TCPDF_LEGACY_LD322 ) ) {
$html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space
}
File tcpdf/tcpdf.php
Function: getHTMLUnitToUnits()
Description of changes: Added condition wrapper around lines 20468-20472.
Original:
if ($points) {
$k = 1;
} else {
$k = $this->k;
}
Changed:
if ( ( ! defined( 'LEARNDASH_TCPDF_LEGACY_LD322' ) ) || ( true !== LEARNDASH_TCPDF_LEGACY_LD322 ) ) {
if ($points) {
$k = 1;
} else {
$k = $this->k;
}
}
File: tcpdf/tcpdf.php
Function: getHtmlDomArray()
Description of changes: Added condition wrapper around lines 16777.
Original:
$dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']);
Changed:
if ( ( ! defined( 'LEARNDASH_TCPDF_LEGACY_LD322' ) ) || ( true !== LEARNDASH_TCPDF_LEGACY_LD322 ) ) {
$dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']);
}
File: tcpdf/tcpdf.php
Function: getHtmlDomArray()
Description of changes: Changed line 16443 to remove invalid tags '<marker/><br/><hr/>' from call to wp_strip_all_tags() function.
Original:
$html = wp_strip_all_tags($html, '<marker/><a><b><blockquote><body><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
Changed:
$html = wp_strip_all_tags($html, '<marker><a><b><blockquote><body><br><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
File: includes/lib/tcpdf/tcpdf.php
Description of changes: LEARNDASH-4582 #3 issue. For security reasons disabled support for K_TCPDF_CALLS_IN_HTML. Lines 19509-19523 commented out.
tcpdf - 6.3.2
---
LearnDash 3.2.2 2020-07-07
File: tcpdf/tcpdf.php
Function: inside getHtmlDomArray()
Description of changes: Added condition wrapper around line 16436 to prevent replacing multiple spaces with single space.
Original:
$html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space
Changed:
if ( ( ! defined( 'LEARNDASH_TCPDF_LEGACY_LD322' ) ) || ( true !== LEARNDASH_TCPDF_LEGACY_LD322 ) ) {
$html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space
}
---
LearnDash 3.2.2 2020-07-07
File: tcpdf/tcpdf.php
Function: inside getHTMLUnitToUnits()
Description of changes: Added condition wrapper around lines 20399-20404.
Original:
if ($points) {
error_log( 'this->k[' . $this->k . ']' );
$retval *= $this->k;
}
Changed:
if ( ( ! defined( 'LEARNDASH_TCPDF_LEGACY_LD322' ) ) || ( true !== LEARNDASH_TCPDF_LEGACY_LD322 ) ) {
if ($points) {
error_log( 'this->k[' . $this->k . ']' );
$retval *= $this->k;
}
}
---
LearnDash 3.2.2 2020-07-07
File: tcpdf/tcpdf.php
Function: getHtmlDomArray()
Description of changes: Added condition wrapper around lines 16690-16692.
Original:
$dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']);
Changed:
if ( ( ! defined( 'LEARNDASH_TCPDF_LEGACY_LD322' ) ) || ( true !== LEARNDASH_TCPDF_LEGACY_LD322 ) ) {
$dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']);
}
---
File: tcpdf/tcpdf.php
Function: getHtmlDomArray()
Description of changes: Changed line 16362 to remove invalid tags '<marker/><br/><hr/>' from call to wp_strip_all_tags() function.
Original:
$html = wp_strip_all_tags($html, '<marker/><a><b><blockquote><body><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
Changed:
$html = wp_strip_all_tags($html, '<marker><a><b><blockquote><body><br><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
---
File: tcpdf/include/barcodes/pdf417.php
Description of changes: PHP 7.4 scan found curly brace syntax for accessing array.
Errors:
881 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $code{$i}
891 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $code{($i + 1)}
955 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $code{$i}
---
File: tcpdf/include/barcodes/datamatrix.php
Description of changes: PHP 7.4 scan found curly brace syntax for accessing array.
Errors:
632 | WARNING | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: $data{$k}
---
File: includes/lib/tcpdf/tcpdf.php
Description of changes: LEARNDASH-4582 #3 issue. For security reasons disabled support for K_TCPDF_CALLS_IN_HTML. Lines 19374-19388 commented out.
File: includes/lib/tcpdf/config/tcpdf_config.php
Description of changes: LEARNDASH-4582 #3 issue. For security reasons disabled support for K_TCPDF_CALLS_IN_HTML. Line 330 changed define value to false.
---
File: includes/lib/tcpdf/include/tcpdf_static.php
Description of changes: added phpcs ignore for lines 143,159,453,454,475,476,493,1835 and 1946
File: includes/lib/tcpdf/tcpdf.php
Description of changes: added phpcs ignore for lines 10929,16361
---
stripe-php - 7.107.0
File: includes/lib/stripe-php/lib/HttpClient/CurlClient.php
Description of changes: added phpcs ignore for line 202