glpi icon indicating copy to clipboard operation
glpi copied to clipboard

[GLPI 10 Bugfixes] SQL Error on loading RSS feeds

Open tsmr opened this issue 11 months ago • 0 comments

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • [X] I have searched the existing issues

Version

[GLPI 10 Bugfixes]

Bug description

Profile without rights on RSS Feeds

On central :

image

On click on the title :

image

[2024-03-07 14:19:29] glpisqllog.ERROR: DBmysql::doQuery() in C:\wamp64\www\glpi10\src\DBmysql.php line 403
  *** MySQL query error:
  SQL: SELECT DISTINCT `glpi_rssfeeds`.`id` AS id, 'me' AS currentuser,
                         GROUP_CONCAT(DISTINCT CONCAT(`glpi_rssfeeds`.`name`, '$#$' ,
                                                        `glpi_rssfeeds`.`id`) ORDER BY `glpi_rssfeeds`.`id`
                                        SEPARATOR '$$##$$') AS `ITEM_RSSFeed_1`,
                           
                            `glpi_users`.`name` AS `ITEM_RSSFeed_2`,
                        `glpi_users`.`realname` AS `ITEM_RSSFeed_2_realname`,
                        `glpi_users`.`id`  AS `ITEM_RSSFeed_2_id`,
                        `glpi_users`.`firstname` AS `ITEM_RSSFeed_2_firstname`,
                        `glpi_rssfeeds`.`is_active` AS `ITEM_RSSFeed_4`,  `glpi_rssfeeds`.`refresh_rate` AS `ITEM_RSSFeed_5`,  `glpi_rssfeeds`.`date_mod` AS `ITEM_RSSFeed_19`,  `glpi_rssfeeds`.`have_error` AS `ITEM_RSSFeed_6`,  `glpi_rssfeeds`.`max_items` AS `ITEM_RSSFeed_7` FROM `glpi_rssfeeds`SELECT * FROM `glpi_rssfeeds`LEFT JOIN `glpi_users` 
                                          ON (`glpi_rssfeeds`.`users_id` = `glpi_users`.`id`
                                              ) WHERE `glpi_rssfeeds`.`users_id` = '6' GROUP BY `glpi_rssfeeds`.`id` ORDER BY `ITEM_RSSFeed_1` ASC  LIMIT 0, 200
  Error: Erreur de syntaxe près de 'SELECT * FROM `glpi_rssfeeds`LEFT JOIN `glpi_users` 
                           ' à la ligne 10
  Backtrace :
  src\Search.php:1458                                DBmysql->doQuery()
  src\Search.php:449                                 Search::constructData()
  src\Search.php:200                                 Search::getDatas()
  src\Search.php:177                                 Search::showList()
  front\rssfeed.php:46                               Search::show()
  {"user":"6@P828"} 

And perhaps hide the RSS Feed is no rights on RSS ?

Relevant log output

No response

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

tsmr avatar Mar 07 '24 14:03 tsmr