Skip to content

Commit a81e142

Browse files
committed
Merge branch '4.9.x' into dev
2 parents 01b3b37 + 8b620ee commit a81e142

File tree

22 files changed

+107
-27
lines changed

22 files changed

+107
-27
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
root = true
2+
3+
[*.{md,txt}]
4+
trim_trailing_whitespace = true

HISTORY.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ Changes in 5.0.0 (upcoming)
66
Changes in 4.9.2 (upcoming)
77

88
* Fixed: Allow upload of plugins where filename length exceeds PHP_MAXPATHLEN.
9+
Changes in 4.9.2 (upcoming)
10+
* Maintenance release with security enhancements, general improvements and
11+
bug fixes.
12+
* Fixed: Allow upload of plugins where filename length exceeds PHP_MAXPATHLEN.
13+
* Fixed: Improved handling of theme import with invalid JSON manifest.
14+
* Fixed: Recursive <txp:yield> handling.
15+
* Fixed: Deleting images deletes corresponding thumbnails (thanks, wet).
16+
* Added: Copy to clipboard feature for Diagnostics and Setup info.
17+
* Added: 'aspect' ratio output from <txp:image_info /> tag.
18+
* Vendors: DOMPurify 3.3.3.
919

1020
Changes in 4.9.1 (14 Feb 2026)
1121

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Note that versions listed may change multiple times during the development proce
7878

7979
## Contributing
8080

81-
Please refer to the [contributing documentation](https://github.com/textpattern/textpattern/blob/dev/CONTRIBUTING.md) for more details of Textpattern development.
81+
Please refer to the [contributing documentation](https://github.com/textpattern/textpattern/blob/dev/CONTRIBUTING.md) for more details of Textpattern development.
8282

8383
## Additional development tools
8484

SECURITY.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ We welcome reports from security researchers and organisations. Before proceedin
66

77
https://textpattern.com/weblog/security-considerations-and-user-privileges-in-textpattern
88

9-
If you wish to report a Textpattern security issue please ensure that you’ve taken care of the following security precautions:
9+
If you wish to report a Textpattern security issue please ensure that you have taken care of the following security precautions:
1010

1111
* Take steps to ensure any vulnerability or issue is not due to a third party script, malfunctioning server, or insufficient security precautions taken by you or your server admin (such as weak passwords, for example).
12-
* Report any and all security vulnerabilities to us first. Do not publicly disclose information about potential security bugs. It’s unhelpful, and can be damaging. We follow the RFPolicy 2.0, and expect you to in return.
12+
* Report any and all security vulnerabilities to us first. Do not publicly disclose information about potential security bugs. It’s unhelpful, and can be damaging. We follow Full Disclosure Policy (RFPolicy) v2.0, and expect you to in return. The policy can be found here:
13+
14+
https://wiretrip.net/rfp/policy.html
15+
1316
* Allow us a reasonable amount of time to assess and correct the issue before sharing details with others or otherwise making details public.
1417
* Provide details as to the nature of the vulnerability, and examples of the steps to replicate it.
1518
* As we are a free, open-source project run by volunteers, we do not offer monetary rewards or provide ‘bug bounties’ for discovering and/or reporting security issues. All security reports should be considered free of charge and voluntary on your part. Thank you for your understanding.

textpattern/include/txp_diag.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,9 @@ function doDiagnostics()
646646
) .
647647
inputLabel(
648648
'diag_clear_private',
649-
checkbox('diag_clear_private', 1, false, 0, 'diag_clear_private'),
649+
checkbox('diag_clear_private', 1, false, 0, 'diag_clear_private').'<span class="txp-textarea-options">
650+
<button class="action-copy-clip txp-reduced-ui-button" data-source="#diagnostics-detail"><span class="ui-icon ui-icon-clipboard"></span> ' . gTxt('copy_to_clipboard') . '</button>
651+
</span>',
650652
'diag_clear_private', 'diag_clear_private', array('class' => 'txp-form-field'),
651653
''
652654
)

textpattern/include/txp_image.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,6 @@ function image_replace()
11031103
}
11041104
}
11051105

1106-
// $img_result = image_data($_FILES['thefile'], $meta, $id);
1107-
11081106
if (is_array($img_result)) {
11091107
list($message, $id) = $img_result;
11101108

@@ -1311,9 +1309,7 @@ function image_delete($ids = array())
13111309
$ul = unlink(realpath(IMPATH . $id . $ext));
13121310
}
13131311

1314-
if (is_file(IMPATH . $id . 't' . $ext)) {
1315-
$ult = unlink(realpath(IMPATH . $id . 't' . $ext));
1316-
}
1312+
deleteThumbnails($id);
13171313

13181314
if (!$rsd or !$ul) {
13191315
$fail[] = $id;
@@ -1423,11 +1419,10 @@ function thumbnail_delete()
14231419
return;
14241420
}
14251421

1426-
$rs = safe_row("id, ext", 'txp_image', "id = $id");
1422+
$rs = safe_row("id, ext, thumbnail", 'txp_image', "id = $id");
14271423

1428-
$t = new txp_thumb($id);
1424+
deleteThumbnails($id, $rs['thumbnail']);
14291425

1430-
$t->delete();
14311426
safe_update('txp_image', 'thumbnail = 0', "id = $id");
14321427
update_lastmod('thumbnail_deleted', compact('id'));
14331428
callback_event('thumbnail_deleted', '', false, $id);

textpattern/lang/en-gb.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ comments_expired="Commenting has expired for this article."
310310
confirm_delete_popup="Really delete?"
311311
contact="Contact"
312312
cookies_must_be_enabled="Browser cookies must be enabled to use Textpattern."
313+
copied="Copied"
313314
copy="Copy"
315+
copy_to_clipboard="Copy to clipboard"
314316
could_not_log_in="Could not log in with that username/password."
315317
create="Create"
316318
css="Style"

textpattern/lang/en-us.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ comments_expired="Commenting has expired for this article."
310310
confirm_delete_popup="Really delete?"
311311
contact="Contact"
312312
cookies_must_be_enabled="Browser cookies must be enabled to use Textpattern."
313+
copied="Copied"
313314
copy="Copy"
315+
copy_to_clipboard="Copy to clipboard"
314316
could_not_log_in="Could not log in with that username/password."
315317
create="Create"
316318
css="Style"

textpattern/lang/en.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ comments_expired="Commenting has expired for this article."
310310
confirm_delete_popup="Really delete?"
311311
contact="Contact"
312312
cookies_must_be_enabled="Browser cookies must be enabled to use Textpattern."
313+
copied="Copied"
313314
copy="Copy"
315+
copy_to_clipboard="Copy to clipboard"
314316
could_not_log_in="Could not log in with that username/password."
315317
create="Create"
316318
css="Style"

textpattern/lib/txplib_admin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ function image_data($file, $meta = array(), $id = 0, $uploaded = true)
444444
if (!$rs) {
445445
return gTxt('image_save_error');
446446
}
447+
448+
// Invalidate (delete) any old thumbnails.
449+
deleteThumbnails($id);
447450
}
448451

449452
chmod($newpath, 0644);

0 commit comments

Comments
 (0)