Osclass Support Forums

General osclass questions => Report bug => Topic started by: glaceon on January 19, 2022, 03:59:27 AM

Title: User Verification issue with shorthand links
Post by: glaceon on January 19, 2022, 03:59:27 AM
Hello,
I've been having some issues with user verifications leading them to a 404 page. I have done some investigation and here is what I have found so far.

/var/logs/apache2/access.log
0.0.0.0 - - [18/Jan/2022:21:40:16 -0500] "GET /user/activate/4/v3rIFyc0de HTTP/1.1" 410 6337 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"

This let to a 404 (410 in apache2) every time. So, I tried a different ID and code and it redirected as follows:
https:// domain.tld /user/activate/2/rand0mc0d3 =>
https:// domain.tld /for-sale/category/2/post-title


So from that I saw that it's mistaking the user ID for the posting ID.

In MySQL I got:
mysql> select * from oc_t_preference;
...
s:32:"^user/activate/([0-9]+)/(.*?)/?$";
s:53:"index.php?page=register&action=validate&id=$1&code=$2";
...


So, the code is there and verified working correctly, and all other permalinks are functioning correctly and to my knowledge. Where do I look now?

Thanks
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on January 19, 2022, 01:32:04 PM
When you look on URL:
/user/activate/4/v3rIFyc0de

---> 4: user id (oc_t_user.pk_i_id)
---> v3rIFyc0de: secret code for that user (oc_t_user.s_secret)
Title: Re: User Verification issue with shorthand links
Post by: glaceon on January 19, 2022, 01:49:55 PM
Yes, I understand. The problem is that it keeps thinking that’s a listing and redirects me to the post instead of user activation. And since there’s no listing 4, it returns with a 404.
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on January 19, 2022, 04:04:00 PM
I though you are talking about user a tivation, not listing activation
Title: Re: User Verification issue with shorthand links
Post by: glaceon on January 19, 2022, 04:19:53 PM
It is user activation, but OsClass is redirecting incorrectly.
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on January 19, 2022, 05:01:35 PM
Let me test it
Title: Re: User Verification issue with shorthand links
Post by: glaceon on January 19, 2022, 10:34:32 PM
Its at https://plushy.fun
Title: Re: User Verification issue with shorthand links
Post by: glaceon on January 20, 2022, 02:31:38 AM
Update:

I've created more listings and now every time I go to verify a user, OsClass takes the user id and redirects the browser to an item listed at that id.

Thanks
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on January 20, 2022, 10:22:10 AM
I could not reproduce that.
only issue found is, that when you are logged in and click on validation link, it does nothing (make sense).
what comes to my mind is if you did not played with permalink setting and created some ambiguity there.
Title: Re: User Verification issue with shorthand links
Post by: glaceon on January 20, 2022, 12:55:13 PM
I disabled users must verify so that people can use the site
Title: Re: User Verification issue with shorthand links
Post by: glaceon on January 22, 2022, 10:34:24 PM
Any update? I need user verification working asap.
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on January 24, 2022, 09:22:10 AM
I could not reproduce that.
only issue found is, that when you are logged in and click on validation link, it does nothing (make sense).
what comes to my mind is if you did not played with permalink setting and created some ambiguity there.

Bug that cannot be reproduced == no bug.
It can be issue of your configuration, server, ...
Title: Re: User Verification issue with shorthand links
Post by: salahjoher on June 10, 2023, 01:35:37 PM
i have the same issue ...
404 OOPS! Page Not Found!
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on June 10, 2023, 03:14:19 PM
Try to disable/reenable friendly urls.
Try to go to permalink settings and simply re-save rules.
Title: Re: User Verification issue with shorthand links
Post by: salahjoher on June 10, 2023, 10:01:43 PM
i have just done.,
the same error...
Title: Re: User Verification issue with shorthand links
Post by: MB Themes on June 11, 2023, 11:19:51 AM
With disabled friendly links? Not possible.
Then try to reinstall Osclass.