UP-NextPush / server-app

UnifiedPush provider for Nextcloud - server application - Moved to https://codeberg.org/NextPush/uppush
GNU Affero General Public License v3.0
67 stars 8 forks source link

Can't remove Devices/Apps #22

Closed danialbehzadi closed 2 years ago

danialbehzadi commented 2 years ago

When I click on delete button for any device or app in the settings and confirm it, nothing happens with no logs.

p1gp1g commented 2 years ago

Indeed, thanks

danialbehzadi commented 2 years ago

The problems still exists in 1.0.6

p1gp1g commented 2 years ago

I can not reproduce then.

Do you have any error in your JavaScript console ?

Can you look at the request sent and the response from the network console ?

danialbehzadi commented 2 years ago

I get a 405 Method Not Allowed error.

Request headers:

DELETE /index.php/apps/files/ HTTP/2
Host: ****
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: */*
Accept-Language: fa-IR,fa;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Origin: https://****
DNT: 1
Connection: keep-alive
Cookie: __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; nc_username=danial; nc_token=****; nc_session_id=****; oc_sessionPassphrase=****; octntlatxsbt=****
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
TE: trailers

Response headers:

HTTP/2 405 Method Not Allowed
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-security-policy: default-src 'self'; script-src 'self' 'nonce-****; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
strict-transport-security: max-age=15552000; includeSubDomains
referrer-policy: no-referrer
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: none
x-xss-protection: 1; mode=block
content-length: 0
content-type: text/html; charset=UTF-8
date: Sun, 10 Jul 2022 12:40:02 GMT
server: Apache/2.4.54 (Debian)
X-Firefox-Spdy: h2
p1gp1g commented 2 years ago

I have no idea why it send the request to this URL. Do you have any specific setup ? To confirm, your settings are at the following URL: https://yourserver.tld/settings/user/uppush ?

danialbehzadi commented 2 years ago

No change there

danialbehzadi commented 2 years ago

The funny part is that if I enabled the dashboard app, the 405 error would changed to:

Request:

DELETE /index.php/apps/dashboard/ HTTP/2
Host: ***
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: */*
Accept-Language: fa-IR,fa;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Origin: https://***
DNT: 1
Connection: keep-alive
Cookie: __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; nc_username=***; nc_token=***; nc_session_id=***; oc_sessionPassphrase=***; octntlatxsbt=***
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
TE: trailers

Response:

HTTP/2 405 Method Not Allowed
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-security-policy: default-src 'self'; script-src 'self' 'nonce-***'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
strict-transport-security: max-age=15552000; includeSubDomains
referrer-policy: no-referrer
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: none
x-xss-protection: 1; mode=block
content-length: 0
content-type: text/html; charset=UTF-8
date: Sun, 24 Jul 2022 07:22:29 GMT
server: Apache/2.4.54 (Debian)
X-Firefox-Spdy: h2
p1gp1g commented 2 years ago

To investigate this issue, it'd be nice to know if you have any specific setup and if you're using the following URL: https://yourserver.tld/settings/user/uppush ?

danialbehzadi commented 2 years ago

The only relevant part in my config is:

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 1.5,
  ),

UnifiedPush Provider settings are under https://cloud.my.tld/index.php/settings/user/uppush

p1gp1g commented 2 years ago

Ok, then I understand why. I haven't think of accessing the settings at /index.php/settings/user/uppush. I'll probably fix this today