Can't activate packages with automatic method

Bug #1070801 reported by YvesG
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: OCSReports
Fix Released
Medium
Erwan

Bug Description

Hi,

Automatic method to activate packages on redistribution group don't work:
HTTPS_SERV POST value isn't used and vérification is always made with config value

Here is a little fix that check if $protectedPost['FILE_SERV'] or $protectedPost['HTTPS_SERV'] are set before assign config value:

In ms_tele_popup_active.php file, I replaced
---
$protectedPost['FILE_SERV']=$values['tvalue']['DOWNLOAD_URI_FRAG'];
$protectedPost['HTTPS_SERV']=$values['tvalue']['DOWNLOAD_URI_INFO'];
---

with

---
if (!isset($protectedPost['FILE_SERV'])) {
     $protectedPost['FILE_SERV']=$values['tvalue']['DOWNLOAD_URI_FRAG'];
}
 if (!isset($protectedPost['HTTPS_SERV'])) {
     $protectedPost['HTTPS_SERV']=$values['tvalue']['DOWNLOAD_URI_INFO'];
}
---

Revision history for this message
YvesG (yves-guimard) wrote :
Erwan (airoine)
Changed in ocsinventory-ocsreports:
assignee: nobody → Erwan (airoine)
Erwan (airoine)
Changed in ocsinventory-ocsreports:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Erwan (airoine) wrote :

Hello Yves

Thanks a lot for your help. This bug is confirmed.
Regarding your patch, I think it's better if we update this condition:

if (!isset($protectedPost['FILE_SERV']) or !isset($protectedPost['HTTPS_SERV'])){

...

}

by

if ((!isset($protectedPost['FILE_SERV']) and $protectedPost['choix_activ'] == 'MAN')
  or (!isset($protectedPost['FILE_SERV_REDISTRIB']) and $protectedPost['choix_activ'] == 'AUTO') or !isset($protectedPost['HTTPS_SERV'])){

...

}

What do you think about that?

Best regards

Erwan

Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: Confirmed → Fix Committed
Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.