mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Only look for admin include if no local found
This switches the behaviour introduced with the last commit so that now the admin folder is only checked for includes if in the specified path none is found.
This commit is contained in:
parent
5b416b311c
commit
0709b4e66d
@ -207,16 +207,19 @@ static xmlDocPtr custom_loader(const xmlChar *URI,
|
|||||||
xsltStylesheet *c;
|
xsltStylesheet *c;
|
||||||
ice_config_t *config;
|
ice_config_t *config;
|
||||||
final_URI = xmlStrdup(URI);
|
final_URI = xmlStrdup(URI);
|
||||||
|
struct stat file;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
/* In case an include is loaded */
|
/* In case an include is loaded */
|
||||||
case XSLT_LOAD_STYLESHEET:
|
case XSLT_LOAD_STYLESHEET:
|
||||||
|
/* Not look in admindir if the include file exists */
|
||||||
|
if (stat((char *)URI, &file) == 0)
|
||||||
|
break;
|
||||||
c = (xsltStylesheet *) ctxt;
|
c = (xsltStylesheet *) ctxt;
|
||||||
/* Check if we actually have context/path */
|
/* Check if we actually have context/path */
|
||||||
if (ctxt == NULL || c->doc->URL == NULL)
|
if (ctxt == NULL || c->doc->URL == NULL)
|
||||||
break;
|
break;
|
||||||
rel_path = xmlBuildRelativeURI(URI, c->doc->URL);
|
rel_path = xmlBuildRelativeURI(URI, c->doc->URL);
|
||||||
if (rel_path != NULL && admin_path != NULL) {
|
if (rel_path != NULL && admin_path != NULL) {
|
||||||
struct stat file;
|
|
||||||
fn = xmlBuildURI(rel_path, admin_path);
|
fn = xmlBuildURI(rel_path, admin_path);
|
||||||
if (fn != NULL && stat((char *)fn, &file) == 0) {
|
if (fn != NULL && stat((char *)fn, &file) == 0) {
|
||||||
final_URI = fn;
|
final_URI = fn;
|
||||||
|
Loading…
Reference in New Issue
Block a user