[owncloud-devel] trusted_domains and home networks

Lukas Reschke lukas at statuscode.ch
Thu Dec 11 20:04:56 GMT 2014

> On 11 Dec 2014, at 21:01, Johannes Ernst <johannes.ernst at gmail.com> wrote:
> However, I’m not certain how to unit-test against varying IP addresses… the closest tests I can find in the core repository seem to be in tests/settings/controller/securitysettingscontrollertest.php but I’m not entirely sure what those tests actually test. Do they just test that the API works, or do they actually check incoming requests against the trusted_domains value?

That’s a tricky one. The tests in the SecuritySettingsController are just for the settings controller, you can find the actual tests in tests/lib/request.php. For example \Test_Request::testIsTrustedDomain. (unfortunately not really the nicest code as it is not using DI and so on - but I guess that is something for later when we clean up OC_Request :-))

I guess they should be a little easier to understand. If you have any questions: Just ask or join our IRC (#owncloud-dev) on Freenode and ping me (AnybodyElse) :-)

- Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4139 bytes
Desc: not available
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20141211/7d4add49/attachment.p7s>

More information about the Devel mailing list