Comments (9)
Hi,
what db are you using?
I can't reproduce using mysql.
edit: also tested with sqlite, can't reproduce either
from 2fauth.
Can you please confirm you have this line in log files (see /2fauth/storage/logs/*.log
:
User ID #x cannot view twofaccount ID #y
from 2fauth.
Hi,
- we are on mysql, both columns in db are in fact integer types
- php 8.2
- yes those are in the logs and are what triggered me to locate the issue:
[2024-03-12 16:38:55] production.NOTICE: User isOwner of with ID #integer vs twofaccount ID #string: [2024-03-12 16:38:55] production.NOTICE: User ID #3 cannot view twofaccount ID #3 [2024-03-12 16:40:45] production.NOTICE: User isOwner of with ID #integer vs twofaccount ID #string:
I have added an extra line of logging for personal debugging
from 2fauth.
Ok, thx for the env setup.
Iยดm going to make more testing, I would like to understand why types are not consistent from one setup to another ๐ค
from 2fauth.
yes, thanks. I i can be of any help let me know. I am a java//php dev as well.
from 2fauth.
Well, I cannot reproduce, even with the exact same setup. What page do you load while debugging the trait?
from 2fauth.
Could you please try this fix for me ?
Edit 2fauth_install_dir/app/Models/TwoFAccount.php
.
Line 148, set the $casts
like this:
protected $casts = [
'user_id' => 'integer',
];
Thx
from 2fauth.
That fixes the issue, triple equality is now comparing two integers
from 2fauth.
Ok thanks ๐๐ป
from 2fauth.
Related Issues (20)
- Secret Type Format
- Blank screen after update from 5.0.3 to 5.0.4 HOT 10
- "Check now" button is untranslatable HOT 1
- Add a route to clear cache from browser
- Add a "keep SSO registration enabled" setting HOT 1
- Cannot access database after upgrading v3 to v5 (self host to docker) --> No account found using this email. HOT 3
- Add support for FreeOPT+ json exports HOT 1
- Can't decipher codes after updating to 5.1.0 HOT 17
- 5.1 SSO: Authentication via SSO rejected HOT 8
- Admin panel not working when using security device
- "Keep SSO registration enabled" is not saved
- Add pagination to /accounts page HOT 4
- Last admin can demote to user, leaving the instance administratorless
- Accounts visibility HOT 1
- Add ipv6 in nginx config
- web static assets visit path is localhost HOT 5
- Self Hosted Docker Compose Install - Blank Home Page HOT 9
- Migrate 2fauth to a new server HOT 2
- TypeError: a is null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 2fauth.