Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZDB Linked Data Service: Suspicious Multiple Requests #25

Open
thoffma opened this issue Aug 3, 2021 · 1 comment
Open

ZDB Linked Data Service: Suspicious Multiple Requests #25

thoffma opened this issue Aug 3, 2021 · 1 comment

Comments

@thoffma
Copy link

thoffma commented Aug 3, 2021

Hi!
We (German National Library) were alerted by our system that we recieve unusual many (multiple) requests from different ip adresses who are all using the agent "TYPO3". After some mail contact with different institutions we suspect the modul libconnect to be the troublemaker.

The requests looks like this:

"GET /data/1468190-0.rdf HTTP/1.1" 200 5758 "
"GET /data/1468190-0.rdf HTTP/1.1" 200 5758 "
"GET /data/2220742-9.rdf HTTP/1.1" 200 5198 "
"GET /data/2220742-9.rdf HTTP/1.1" 200 5198 "

and so on...
We can not say since when this started.

Do you have an idea what could be the issue? Could it be an issue inside libconnect?

Thanks
Tracy (DNB)

@gjaekel
Copy link

gjaekel commented Aug 3, 2021

Seems to be a duplicate of #18.

In getTitleHistory

private function getTitleHistory($zdbId)
{
$precursor = $this->zdb->getPrecursor($zdbId, true);
krsort($precursor);
$successor = $this->zdb->getSuccessor($zdbId);
if ((empty($precursor)) && (empty($successor))) {
return false;
}
return ['precursor' => $precursor, 'zdbData' => $this->zdb->getZdbData(), 'successor' => $successor];
}

there's a call to getPrecursor and getSuccessor:
public function getPrecursor($zdbId, $initial = false)
{
//example "https://ld.zdb-services.de/data/2890450-3.rdf";
$url = 'https://ld.zdb-services.de/data/' . $zdbId . '.rdf';
$request = $this->setRequest($url);

public function getSuccessor($zdbId)
{
$url = 'https://ld.zdb-services.de/data/' . $zdbId . '.rdf';
$request = $this->setRequest($url);

This both methods did a HTTP-request to the Backend ld.zdb-services.de in any case; that's the reason for a double call.

To avoid this, the result of a call to a identical backend URL might be cached and reused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants