Package Details: python-safehttpx 0.1.7-3

Git Clone URL: https://aur.archlinux.org/python-safehttpx.git (read-only, click to copy)
Package Base: python-safehttpx
Description: A small Python library created to help developers protect their applications from Server Side Request Forgery (SSRF) attacks.
Upstream URL: https://github.com/gradio-app/safehttpx
Licenses: Apache-2.0
Submitter: medaminezghal
Maintainer: medaminezghal
Last Packager: medaminezghal
Votes: 1
Popularity: 0.000091
First Submitted: 2025-02-19 14:27 (UTC)
Last Updated: 2025-12-01 09:03 (UTC)

Latest Comments

1 2 Next › Last »

micwoj92 commented on 2025-12-01 16:27 (UTC)

Now it all works, thanks

micwoj92 commented on 2025-11-30 23:30 (UTC)

Now different, 19 failures with same message

=================================== FAILURES ===================================
___________________ test_local_urls_fail[https://localhost] ____________________
async def functions are not natively supported.
You need to install a suitable plugin for your async framework, for example:
  - anyio
  - pytest-asyncio
  - pytest-tornasync
  - pytest-trio
  - pytest-twisted

medaminezghal commented on 2025-11-28 19:25 (UTC)

@micwoj92 it should works now

micwoj92 commented on 2025-11-28 19:19 (UTC)

@medaminezghal Still fails, please resolve this issue:

==> Starting check()...
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.2, pluggy-1.6.0 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-safehttpx/src/safehttpx-0.1.7
configfile: pyproject.toml
plugins: anyio-4.11.0
collecting ... collected 0 items / 1 error

==================================== ERRORS ====================================
________________________ ERROR collecting test/test.py _________________________
ImportError while importing test module '/build/python-safehttpx/src/safehttpx-0.1.7/test/test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
/usr/lib/python3.13/site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
/usr/lib/python3.13/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
test/test.py:2: in <module>
    import safehttpx
E   ModuleNotFoundError: No module named 'safehttpx'
=========================== short test summary info ============================
ERROR test/test.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.09s ===============================
==> ERROR: A failure occurred in check().
    Aborting...

micwoj92 commented on 2025-09-09 21:28 (UTC)

Check fails with:

test/test.py:3: in <module>
    import safehttpx
E   ModuleNotFoundError: No module named 'safehttpx'

medaminezghal commented on 2025-08-11 14:53 (UTC)

@Felixoid I'm not the developer of this package. I'm just a maintainer.

You can raise those issues to the developers to make the tests more flexible or independent from system configuration.

Felixoid commented on 2025-08-11 12:51 (UTC) (edited on 2025-08-11 13:03 (UTC) by Felixoid)

Sorry, but you ignore the argument about DNS and poorly written function.

  1. Your check() function is written in a way, that it's impossible to run it two times without cleaning the repository. installer fails on the second time. Have you tested it as makepkg -f && makepkg -f? I doubt you have. That's how it fails with true instead of a failing test https://pastila.nl/?0037c573/f2e7b848a4b37a2db9ac9824c50097e5#S8eIFcvNy/yo9SK3eELV6w==
  2. My DNS doesn't know about 192.168.1.250.nip.io. For sure, you can argue "fix your DNS", but that's an offtopic here. The package can't be checked correctly. It tests my network, not the software. So this test is broken by design, and it's for best to disable tests that are flaky depends on the environment.

Work on my system is the worst possible reason I can imagine, with all due respect.

medaminezghal commented on 2025-08-11 12:43 (UTC)

@Felixoid I have test the installation in new cleanly installed system and it works.

Felixoid commented on 2025-08-11 11:58 (UTC)

And that's how two launches of makepkg one following another looks like https://pastila.nl/?00395479/7d9c8e05b1490c0e680c8d24e0727abc#/awv5R+RBiR6/t0/AkrpMw==

The test with install is not idempotent. It fails for the following runs.

Felixoid commented on 2025-08-11 11:54 (UTC)

That's how the build looks like for a clean git repo without any changes. https://pastila.nl/?001b73b2/ed5a381604f61612721c1076de6d313d#f25DNjDNVy0JKdQ/JxLj3A==

Testing user's DNS is a strange approach that for the best must be addressed by the upstream developer.

Although now the AUR package tests my DNS.

> dig 192.168.1.250.nip.io

; <<>> DiG 9.20.11 <<>> 192.168.1.250.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5127
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;192.168.1.250.nip.io.          IN      A

;; Query time: 19 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Mon Aug 11 13:53:51 CEST 2025
;; MSG SIZE  rcvd: 49

> dig @1.1.1.1 192.168.1.250.nip.io

; <<>> DiG 9.20.11 <<>> @1.1.1.1 192.168.1.250.nip.io
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21873
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;192.168.1.250.nip.io.          IN      A

;; ANSWER SECTION:
192.168.1.250.nip.io.   3600    IN      A       192.168.1.250

;; Query time: 75 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Mon Aug 11 13:54:26 CEST 2025
;; MSG SIZE  rcvd: 65

And it's a strange approach.