-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Upgrading from 0.11.2 to 0.12.3 breaks anonaddy #150
Comments
@yurividal Hum not sure if Alpine 3.16 bump #131 is responsible for this. Alpine 3.16 install Postfix 3.7.2 and previously we had Postfix 3.6.6. I will push 0.12.3 against Alpine 3.15 ant let you know when the image is available. might also be linked to #136 |
@yurividal No PHP 8.1 pks available in Alpine Linux 3.15 unfortunately and AnonAddy 0.12 requires PHP 8.1. Will see if building postfix from source would be a better idea. |
Has this been fixed on the latest release? |
Looking at how packaging for postfix is currently handled in Alpine and patches being applied, it doesn't seem we have a straight forward way to build postfix from source without taking into account aports changes. As postfix seems to be the culprit here, I will take a look to create a postfix docker image (non-runnable with only bins) to be able to tackle this issue. @willbrowningme Are you aware of issues with postfix > 3.6? |
Those errors look to me like the issue is an error connecting to Rspamd, as that is the port that Rspamd runs on. e.g. in
|
@willbrowningme Yes that looks like it but can't repro on my side. @yurividal Can you post full logs and also your compose file as well as env file if applicable? Thanks. |
@crazy-max i just upgraded to 0.13.3 (latest) in order to collect the logs for you, and to my surprise, the forwarding worked this time. Something between 0.12.3 and 0.13.3 fixed the issue. |
here are the logs of the working forward:
feel free to close this issue if you want. Only issue i see with this version is the version string not being picked up, but i think a fix for that is on the works |
Yes indeed: #156 (comment) |
@crazy-max , sorry. I just realized that after upgrading to 0.13.3, i can no longer execute any actions on the web ui. I know i had to generate a new api token for my app. The app works fine. But, on the web ui, i can't execute any actions. I tells me I am not authenticated. I have tried different browser and anonymous browser sessions. |
@yurividal thanks for bringing that to my attention, I believe the issue is something to do with this -https://laravel.com/docs/9.x/sanctum#configuring-your-first-party-domains What is the IP that Docker makes request from, would it be |
The default domains considered stateful by Laravel Sanctum are: [
"localhost",
"localhost:3000",
"127.0.0.1",
"127.0.0.1:8000",
"::1",
"example.com"
] As can be seen here, where example.com is the current app URL with port. |
I'm not sure I understand your question. Do you mean what is the IP that anonaddy container sees as the source of the request? |
Yes, I believe the issue is that the domain is not being considered stateful by Sanctum which is why it is saying unauthenticated. |
@willbrowningme Looking at the code: https://github.com/anonaddy/anonaddy/blob/443d646af6d45e8d0bfa3fa8c984b95cf790292d/config/sanctum.php#L18-L22 I made changes in #158 to take into account
|
@crazy-max I'm not sure it needs all domains, I think it only needs the domain that the web application is being run on e.g. on the hosted version this would be So it just needs to be whatever domain they are using to access the web application. |
Ok so
Otherwise yes web server listening to |
Can you show your logs? There might be smth useful there. |
Browser console logs:
Anonaddy Container Logs:
As you can see, nothing very useful. Ps: 10.10.10.6 is the IP of my reverse proxy (nginx). But, when i access anonaddy directly through its IP and port, i also get the same error, (with my PC's ip on the beginning of the line). No, not an nginx issue |
Perhaps |
I have created an env "SANCTUM_STATEFUL_DOMAINS" and assigned it the IP of my nginx. I verified that anonaddy can echo this variable, but issue still persists. |
Thanks, but, even after adding the .env file with the variable into the /data folder, the error still persists. Unauthorized.
|
What if you set it as:
Where |
It worked! |
I suspect the one that worked is either I could update the 'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort(),
','.config('app.url').':8000'
))), Then we shouldn't need to set anything for the environment variable Is your |
Yes, it is. Its set to https://anonaddy.mydomain.com |
Okay, are you able to open up laravel tinker in the command line by running Laravel\Sanctum\Sanctum::currentApplicationUrlWithPort(); I think it will be |
Exactly:
|
@willbrowningme Looking at this, if
So add a comma : |
@crazy-max in Laravel the So if you set The change I just made should mean we don't need to set |
Looks good thanks, will make the modifications and publish new docker image. |
The latest image (0.13.5) didn't fix the issue for me. From the things you wrote above I thought that you didn't have to add anything to the |
I know this issue was reported when 0.12.2 was released, but even with 0.12.3, anonaddy seems broken. Reverting back to 0.11.2 fixes.
I see errors in the logs:
PS: 10.10.10.1 is my router's LAN address.
My docker-compose file is based on the example one in this repo, and my anonaddy.env file too.
The text was updated successfully, but these errors were encountered: