Moodle

Backup does not serialize user info

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.9.3
  • Component/s: Backup
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

When backing up users, Moodle saves some additional information into the field "info", e.g.:
s:14:"exists,needed,";
in some cases, the value of "info" is unserialized - just plain "needed". This is considered as an issue and rises the debugging notice Illegal string "needed" ...

Issue Links

Activity

Hide
David Mudrak added a comment -

MDL-16298.patch.txt fixes the problem. Waiting for +1 to commit.

Show
David Mudrak added a comment - MDL-16298.patch.txt fixes the problem. Waiting for +1 to commit.
Hide
Martin Dougiamas added a comment -

I think this looks OK but I really need a quick +1 from Mr Eloy ... Eloy can you look at this? Should only take you 2 minutes!

Show
Martin Dougiamas added a comment - I think this looks OK but I really need a quick +1 from Mr Eloy ... Eloy can you look at this? Should only take you 2 minutes!
Hide
Eloy Lafuente (stronk7) added a comment -

Note this is a duplicate of MDL-13641 (the serialized thing).

Problem is that the "needed" string (unseriazed) can be used later in the backup process. And if we start serializing it something can become wrong, so it isn't only a matter of serializing it.

We need to review all uses of "needed" in backup process before start serializing it. Right now everything works ok (but the notice in DEBUGGING mode). So, I'd close this as duplicate and move the work (review all "needed" usages) to MDL-13641.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Note this is a duplicate of MDL-13641 (the serialized thing). Problem is that the "needed" string (unseriazed) can be used later in the backup process. And if we start serializing it something can become wrong, so it isn't only a matter of serializing it. We need to review all uses of "needed" in backup process before start serializing it. Right now everything works ok (but the notice in DEBUGGING mode). So, I'd close this as duplicate and move the work (review all "needed" usages) to MDL-13641. Ciao
Hide
David Mudrak added a comment -

Thanks for the comment, Eloy. But if I understand it correctly, the unserialized string "needed" is inserted into backup_ids immediately - see the place where my diff applies. So IMHO it should be safe to serialize here.

I agree we can close this issue and continue discussion in MDL-13641

Show
David Mudrak added a comment - Thanks for the comment, Eloy. But if I understand it correctly, the unserialized string "needed" is inserted into backup_ids immediately - see the place where my diff applies. So IMHO it should be safe to serialize here. I agree we can close this issue and continue discussion in MDL-13641
Hide
Eloy Lafuente (stronk7) added a comment -

Closing as duplicate. Work continues in MDL-13641 (where we must check all current, unserialized, uses of 'needed' and "needed" before serializing it.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Closing as duplicate. Work continues in MDL-13641 (where we must check all current, unserialized, uses of 'needed' and "needed" before serializing it. Ciao

People

Dates

  • Created:
    Updated:
    Resolved: