Small xml parsing bug

Support and feedback for UniAdmin

Small xml parsing bug

Postby swampy » Wed Aug 08, 2007 11:50 pm

Hiya,

Quick fixable issue with uniadmin in the GETADDONLIST operations.

Some sites have a home page with an ampersand in the title. This causes Uniuploader to crash. The bug has already been reported here, but here's the workaround.

Sample file:
FuBar-DPS: http://files.wowace.com/FuBar_DPS/FuBar_DPS.zip

TOC Shows:
Code: Select all
## X-Website: http://www.wowinterface.com/downloads/fileinfo.php?s=&id=5013


The URL passes the '&' direct into the XML, breaking it and causing the following error:

Code: Select all
UpdateAddons: This is an unexpected token. The expected token is 'SEMICOLON'. Line 1246, position 136.


The '&' should be escaped.

Fix:
File: modules/interface.php, line 279:
Code: Select all
$addonElement->attribute('homepage', $row['homepage']);


change to:
Code: Select all
$addonElement->attribute('homepage', htmlspecialchars($row['homepage']));


edit: added the url for the existing bug report.
Last edited by swampy on Thu Aug 09, 2007 12:18 am, edited 1 time in total.
User avatar
swampy
WR.net Apprentice
WR.net Apprentice
 
Posts: 43
Joined: Mon Sep 25, 2006 9:38 pm
Location: UK

Small xml parsing bug

Postby zanix » Thu Aug 09, 2007 1:09 am

Thanks
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to UniAdmin

Who is online

Users browsing this forum: No registered users and 0 guests

cron