Problem/Motivation

The related issue passes the username, email, and ip to the service as an array. This causes the service to return the results also as an array. But none of the callers to spambot_sfs_request() expect the $data set by reference to be an indexed array of results.

Steps to reproduce

Try to validate an account and notice that the result is always a "pass", even if the service returned that the data from the account "appears" on the service.

Proposed resolution

Three options:
1. Change all the callers to spambot_sfs_request() to check for the result in array index 0
2. Revert the related issue and fix the caching elsewhere.
3. Write a helper that returns the results not in an indexed array.

Since eventually it would be useful to pass more than one item to the service, as is allowed, I favor option 3.

Comments

DanChadwick created an issue. See original summary.

danchadwick’s picture

Issue summary: View changes
danchadwick’s picture

Status: Active » Needs review
StatusFileSize
new6.6 KB

I found and fixed tons of bugs -- wrong cache keys, wrong data being accessed, incorrect operation when some data but not all requested parameters are cache hits, plus every request was not working (because the resulting $data was contained an indexed array of results, rather than a single result).

This patch implements a service query on multiple username, email, and ip data. The cache is checked for each before query and are not queried if returned in the cache. The results from the request, if any, are then cached. So a request can result in a full miss, a full hit, or a mixture of the two.

kala4ek’s picture

Assigned: Unassigned » kala4ek

  • DanChadwick authored 8ca9843 on 8.x-1.x
    Issue #3211503 by DanChadwick, kala4ek: Regression: Fixing caching...
kala4ek’s picture

Assigned: kala4ek » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.