Comments (16)
@strk If define email as UNIQUE in database and creates validation solves the problem
from gitea.
@lunny that's a migration/upgrade problem, yes, but if we think same-email should not be allowed, it would be useful to start preventing that for future accounts at least. Of course it's also important for code to be tolerant to unexpected database states.
from gitea.
@strk: We work on Gogs as a company, but mainly our own customizations (click on my above issue I made for our developers to see our repo, which is tailored for content editing and content linking/scrubbing/etc. rather than coding), but do try to do what we can for upstream (gitea), so if we tackle the issue I made, we will do it for upstream.
@lunny: Every time the 500 error comes up, we finally (hopefully more quickly now than before) realize it is this bug and have to make a quick email change. I guess we need to somehow search for the email address from the app/api before signing someone up for now.
from gitea.
I think forbidding multiple users with same email could be a good idea, in general.
from gitea.
An unique maybe not a good idea since there are the same email. It will result in the gitea can not start.
from gitea.
If user already have same emails on gitea/gogs database, when he upgrade gitea to the new version, it will report a migration error and will not start the service. At this situation, user MUST change the user's email on the database manually. That's not our expected situation. So we have to resolve this before we add an unique tag on email field.
from gitea.
If define email as UNIQUE in database and creates validation solves the problem
Like @lunny says, I've seen people (and bugs related to) use the same email for several accounts so a migration would be necessary.
Proposed migration flow:
No Collisions
- Currently at v0.9
- Upgrade to v1.1.0 (current milestone for this issue)
- Migration runs on start
- No duplicate emails found, Gogs starts as usual
Collisions
- Currently at v0.9
- Upgrade to v1.1.0 (current milestone for this issue)
- Migration runs on start
- Duplicate emails found, Gogs fails migration and throws an Error
PREFERED No Collisions
- Currently at v0.9
- Upgrade to v1.1.0 (current milestone for this issue)
- Migration runs on start
Noduplicate emails found, Gogs starts inMaintenance
-mode, requiring Admins for login. Everything locked down except for settings.
Preferred way required Maintenance-mode (which hasn't been requested but would be nice )
from gitea.
@bkcsoft you mean Duplicate emails found
in the last bullet, right ?
I think we should go there incrementally, and the first step is preventing the registration of users with the same email as other users. From the original report in this ticket there is an attempt in code to prevent that (see how second user could not register with same email) but evidently not all code paths do check for that occurrence.
from gitea.
@strk Correct. Changed the text now ๐
Indeed it should be done incrementally, could you have a look at that? ๐
from gitea.
Any work been done on this? We are needing to fix the problem as we have many people signing up through the API and they sometimes use the same email address, forgetting they are already in our system but with a different username.
from gitea.
We maybe fix this on 1.1. We would like to limit email should be uniqued. So that every user have to use different email. Maybe you can ask your guys to change their email address?
from gitea.
from gitea.
I have noticed a similar behaviour which is somehow related to the duplicate-email-issue.
I have set up a fresh instance of gitea without migrating from gogits. I have created two users with different email addresses but changed one user's mail address to the other's after that.
The result is an Error 500 every time one of these users try to login. However, the session starts up fine, and if you manually navigate to the logged in user's dashboard, it seems to work - until you go and view the commit history of a repo or single file and try to view an older commit. There you get an Error 500 as well which is not workaroundable.
So i think a unique flag for email addresses and enforcing it at registration or in the user control panel would be the best solution.
from gitea.
@simonszu which version have you installed?
from gitea.
@lunny I am a bit surprised that my installation does not report any version number, but a commit hash. It is Version: 6aacf4d. I installed it around Febrary 6th, 2017.
from gitea.
Yes. That's v1.0.1. I will fix this issue these days.
from gitea.
Related Issues (20)
- Limit the Number of Users a Gitea Deployment Can Have HOT 2
- Manage Access Tokens page resets permissions settings to No Access when form fails validation
- Login UI layout issue, the top marin of the login div missed. HOT 9
- Edit comment bug: can not save empty comment HOT 4
- ๅ ณ้ญJavascript็้่ฏฏๆ็คบ HOT 1
- Page load times slow down when runners are started HOT 1
- Missing url for `Learn more about blocking a user.` HOT 1
- tag created timestamp is a negative value in some cases HOT 1
- Wrong UI when repo name too long in `Reference in new issue`
- Always support repo code search even if the indexer is not enabled HOT 9
- Can't remove WIP from PR title HOT 12
- No matching online runner with label: {label_name}, even though such a runner exists HOT 1
- The logos in the migration page are aligned to the left instead of center HOT 2
- The buttons on the file view page are not aligned HOT 2
- UI preventing org repo creation as well if user org limit is reached
- `DEFAULT_ORG_MEMBER_VISIBLE` ignored for first org member
- Container package should show Image ID in addition to Digest HOT 8
- Disable Minimum Key Size Check shown as ร despite MINIMUM_KEY_SIZE_CHECK = false HOT 1
- "Go to file" doesn't work for branches containing a # HOT 2
- cannot un-WIP or change PR title HOT 3
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 gitea.