Project

General

Profile

Actions

Bug #5712

closed
RB RB

System Patches package: system_patches_edit.php - Patch contents is cleared when error happens

Bug #5712: System Patches package: system_patches_edit.php - Patch contents is cleared when error happens

Added by Renato Botelho over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
System Patches
Target version:
Start date:
12/29/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.3
Affected Plus Version:
Affected Architecture:

Description

Add a new patch, then fill 'patch contents' with a patch and 'URL/Commit ID' with invalid data then press 'Save'.

It'll report error and remove content from 'patch contents'

Updated by Anonymous over 10 years ago Actions #1

  • Subject changed from System Patches: Patch contents is cleared when error happens to System Patches package: system_patches_edit.php - Patch contents is cleared when error happens
  • Status changed from New to Assigned
  • Assignee changed from Anonymous to Jim Pingle

It would appear that this is due to the patch being base64 encoded when saved to the config (no error) but being plain text when the page reloads after an error.

This is a simple way to fix it:

system_patches_edit.php line 184:

$patchtext = new Form_Textarea(
    'patch',
    'Patch Contents',
    $input_errors ? $pconfig['patch'] : base64_decode($pconfig['patch'])
);

JP Updated by Jim Pingle over 10 years ago Actions #2

  • Status changed from Assigned to Feedback

Fix committed

Updated by Anonymous over 10 years ago Actions #3

  • Assignee changed from Jim Pingle to Renato Botelho

Updated by Anonymous over 10 years ago Actions #4

  • Status changed from Feedback to Resolved

CB Updated by Chris Buechler over 10 years ago Actions #5

  • Affected Version set to 2.3
Actions

Also available in: Atom