[dspace-tickets] [DuraSpace JIRA] (DS-2683) Logging statistics through API only logs ip when using proxy

2 views
Skip to first unread message

Roeland Dillen (@mire) (DuraSpace JIRA)

unread,
Aug 17, 2015, 12:45:20 PM8/17/15
to dspace-...@lists.sourceforge.net
Roeland Dillen (@mire) created an issue
 
DSpace / Bug DS-2683
Logging statistics through API only logs ip when using proxy
Issue Type: Bug Bug
Assignee: Unassigned
Created: 30/Jul/15 3:26 AM
Priority: Minor Minor
Reporter: Roeland Dillen (@mire)
The overloaded method org.dspace.statistics.SolrLogger#getCommonSolrDoc(org.dspace.content.DSpaceObject, java.lang.String, java.lang.String, java.lang.String, org.dspace.eperson.EPerson) as opposed to org.dspace.statistics.SolrLogger#getCommonSolrDoc(org.dspace.content.DSpaceObject, javax.servlet.http.HttpServletRequest, org.dspace.eperson.EPerson) only logs the ip is useProxies is enabled and something is filled in in X-Forwarded-For. This is because the entire block logging data derived from the IP is wrapped in if (isUseProxies() && xforwardedfor != null) while it should only be the determination of the ip.

Luckily this code doesn't usually get triggered as usually the UsageEvent will contain a reference to the ServletRequest but someone will eventually use this code.
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.2.6#6264-sha1:ee76422)
Atlassian logo

Roeland Dillen (@mire) (DuraSpace JIRA)

unread,
Aug 17, 2015, 12:45:21 PM8/17/15
to dspace-...@lists.sourceforge.net

Bram Luyten (@mire) (DuraSpace JIRA)

unread,
Aug 17, 2015, 12:45:26 PM8/17/15
to dspace-...@lists.sourceforge.net
Bram Luyten (@mire) updated an issue
 
Change By: Bram Luyten (@mire)
Status: Received Code Review Needed

Bram Luyten (@mire) (DuraSpace JIRA)

unread,
Aug 17, 2015, 12:45:26 PM8/17/15
to dspace-...@lists.sourceforge.net

Bram Luyten (@mire) (DuraSpace JIRA)

unread,
Aug 17, 2015, 12:45:28 PM8/17/15
to dspace-...@lists.sourceforge.net

Bram Luyten (@mire) (DuraSpace JIRA)

unread,
Aug 17, 2015, 12:45:29 PM8/17/15
to dspace-...@lists.sourceforge.net
Bram Luyten (@mire) commented on Bug DS-2683
 
Re: Logging statistics through API only logs ip when using proxy

+1 looks good, should be good for merging when another committer approves.

Tim Donohue (DuraSpace JIRA)

unread,
Aug 24, 2018, 11:01:01 AM8/24/18
to dspace-...@googlegroups.com
Tim Donohue commented on Bug DS-2683

As noted in the PR#1000, I believe this has already fixed on the "master" branch via a separate PR.

https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/statistics/SolrLoggerServiceImpl.java#L287

However, I'd appreciate verification of that before closing this ticket.

This message was sent by Atlassian JIRA (v7.10.0#710001-sha1:0399717)

Tim Donohue (LYRASIS JIRA)

unread,
Aug 11, 2021, 6:07:01 PM8/11/21
to dspace-...@googlegroups.com
Tim Donohue closed an issue as Fixed
 

Closing as fixed, as the related PR was also closed as fixed.

Change By: Tim Donohue
Resolution: Fixed
Status: Code Review Needed Closed
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages