-
Notifications
You must be signed in to change notification settings - Fork 509
Fix unserialize
Vulnerability
#2821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a286912
to
f936d45
Compare
Qué es esto? "Fix unserialize"? Había un "unserialize" antes? Cuál es la tarea? |
@jmontoyaa es para corregir una vulnerabilidad de |
No agregar "use Brumann\Polyfill\Unserialize;" por todos lados. Algo como:
|
Corregido |
main/admin/career_diagram.php
Outdated
@@ -106,7 +108,8 @@ | |||
$tpl = new Template(get_lang('Diagram')); | |||
$html = Display::page_subheader2($careerInfo['name'].$urlToString); | |||
if (!empty($item) && isset($item['value']) && !empty($item['value'])) { | |||
$graph = unserialize($item['value']); | |||
/** @var Graph $graph */ | |||
$graph = api_unserialize_content('carrer', $item['value']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
career ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bien visto!
Corregido
@@ -14,6 +14,8 @@ | |||
ALTER TABLE extra_field_values modify column value longtext null; | |||
*/ | |||
|
|||
use Fhaculty\Graph\Graph; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya no se necesita ese "use" supongo ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sí... se usa para un /** @var Graph $graph */
@jmontoyaa wrote:
Pero sí estás en copia de los correos de seguridad donde hemos estado explicando todo ;-) |
@ywarnier no sabía que era el mismo tema. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. Thanks @jmontoyaa for the additional review!
It generates an error in the learning path, but I can only reproduce it with a scorm. And then got to the learning path tool and edit the the learning path setting and click on the "Hide table of contents frame" checkbox and validate. You then get the following error :
You can directly reproduce the error from here : https://11.chamilo.org/main/lp/lp_controller.php?cidReq=JEUXSERIEUXORTHOGRAPHE&id_session=0&gidReq=0&gradebook=0&origin=&action=edit&lp_id=36 clicking on the "Hide table of contents frame" checkbox and validating. |
It should be fixed now |
All good, thank you. 👍 |
I also have an error when restoring a backup, about CourseRestorer::restore_gradebook() |
I have the same error Yannick reported. |
No description provided.