Correct and
sito <[email protected]>
| Newsgroups | gmane.comp.cms.infoglue.devel |
|---|---|
| Message-ID | <[email protected]> |
In InfoGlue version 2.9.6.3 ...
Developer members,Could you make the following changes in the next
version of IG?
------------------------------------------------------------------------------
PROBLEM:
When we create an URL of a CSS (that includes images as assets) with the
tag pageAsDigitalAssetUrl:
<structure:pageAsDigitalAssetUrl id="cssUrl" fileSuffix="css"
useInheritance="false" siteNodeId="${cssPage.siteNodeId}" />
It is generated correctly, but the contents of the CSS, in addition to
the content includes the following information that should be deleted of
the CSS to remain valid
<usedEntities>content_100715,contentVersion_100583,contentVersion_100570,contentVersion_100581,</usedEntities>
SOLUTION: Delete substring of usedEntities
Package: org.infoglue.deliver.controllers.kernel.impl.simple
Class: NodeDeliveryController.java
**** At line 1440 INSERT:
//DELETE LIST OF USED ENTITIES
pageContent = pageContent.substring(0,usedEntitiesIndex -1);
------------------------------------------------------------------------------
------------------------------------------------------------------------------
PROBLEM: Incorrect IP origin with intermediated PROXY(s) as Apache Httpd
(ProxyPass)
SOLUTION:
Package org.infoglue.cms.controllers.kernel.impl.simple
*** At line 255 INSERT:
// Restricted by the origin of IP in forwarded PROXYs
public boolean getIsIPAllowed(HttpServletRequest request, String ip){
boolean isIPAllowed = false;
String ipRemote = null;
String ipRequest = null;
if (request != null) {
ipRequest = request.getRemoteAddr();
ipRemote = request.getHeader("X-Forwarded-For");
//System.out.println("Request: "+ipRequest+", Remote:
"+ipRemote+", Ip:"+ip);
if (ip.equals(ipRequest)){
isIPAllowed=true;
}else if (ipRemote.indexOf(",") > 0){
String[] ips = ipRemote.split(",");
//The first IP is the origin, other IPs added by
forward
if ((ips.length>0) && (ip.equals(ips[0].trim()))){
isIPAllowed=true;
}
}else{
if (ip.equals(ipRemote)) isIPAllowed=true;
}
}
return isIPAllowed;
}
**** At line 356 MODIFY line with code:
if(remoteIP.startsWith(allowedIP) ||
getIsIPAllowed(request,allowedIP))
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Thanks in advance
Regards
--
-------------======ooOO000OOoo======--------------
Vicente Javier Rosselló Ferrer
E-mail: vrossello [arroba] uib.es
Centre de Tecnologies de la Informació a la UIB
Edifici Anselm Turmeda - CTI
Ctra. Valldemossa 7.5km
Universitat de les Illes Balears
==================================================
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword