"Bad Request" from my fedorapeople url #10377
Labels
No labels
announcement
authentication
automate
aws
backlog
blocked
bodhi
ci
Closed As
Duplicate
Closed As
Fixed
Closed As
Fixed with Explanation
Closed As
Initiative Worthy
Closed As
Insufficient data
Closed As
Invalid
Closed As
Spam
Closed As
Upstream
Closed As/Will Not
Can Not fix
cloud
communishift
copr
database
deprecated
dev
discourse
dns
downloads
easyfix
epel
factory2
firmitas
gitlab
greenwave
hardware
help wanted
high-gain
high-trouble
iad2
koji
koschei
lists
low-gain
low-trouble
mbs
medium-gain
medium-trouble
mini-initiative
mirrorlists
monitoring
Needs investigation
notifier
odcs
OpenShift
ops
OSBS
outage
packager_workflow_blocker
pagure
permissions
Priority
Needs Review
Priority
Next Meeting
Priority
🔥 URGENT 🔥
Priority
Waiting on Assignee
Priority
Waiting on External
Priority
Waiting on Reporter
rabbitmq
rdu-cc
release-monitoring
releng
repoSpanner
request-for-resources
s390x
security
SMTP
src.fp.o
staging
taiga
unfreeze
waiverdb
websites-general
wiki
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Infrastructure/fedora-infrastructure#10377
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe what you would like us to do:
Hello, please I newly joined fedorapeople.org following the docs
https://fedoraproject.org/wiki/Infrastructure/fedorapeople.org
but when I visit my fedorapeople url (https://vanessa_kris.fedorapeople.org) I get "Bad Request"
Attached is a screenshot of the response
When do you need this to be done by? (YYYY/MM/DD)
@vanessa_kris and I checked their folder permissions for both
$HOME
and$HOME/public_html
, and they seem fine, so I'm not sure what else to look at for the moment.This is due to the _ in the name. we never allowed underscores in the old account system and the web rules need adjusting.
Metadata Update from @mohanboddu:
Are we looking to:
Which application is doing the data validation for the username?
AustinPowered
There's no way to do 1 aside from disabling the existing user and adding a new one
Allowing or disallowing _ is a thing in noggin. There's a bigger discussion about that. This ticket is just to make fedorapeople web space work with it for now until we decide at the higher level.
kevin: what do you mean by disabling and re-adding? Do you mean at FAS level? or simply fedorapeople? And if it's just fedorapeople, is it in ansible or directly modifying the users on the machine?
Thanks,
Leo
P.S. I am working together with austinpowered to solve this issue :)
So this issue (fedorapeople public_html space not working for a user with _ in their name) can be fixed by adjusting:
roles/people/templates/people.conf
RewriteRule ^([a-z0-9-]+).fedorapeople.org/(.*) /home/fedora/$1/public_html/$2 [L]
probably
If we wish to disallow _ in usernames, we would need to get noggin to disallow this, then disable every existing user with _ in their username and ask them to create new accounts.
That is beyond the scope of this ticket. I just want the cosmetic public_html thing fixed here.
Does that make sense?
Yes. Thanks! :)
The current rule allows usernames with lower-case letters only, numbers, and the '-' character. The rule also allows the '-' to be the first character.
RewriteRule ^([a-z0-9-]+).fedorapeople.org/(.*) /home/fedora/$1/public_html/$2 [L]
To allow '_' in usernames as well as the '-' the regex could simply be:
RewriteRule ^([\w-]+).fedorapeople.org/(.*) /home/fedora/$1/public_html/$2 [L]
I'm not sure if the '-' or '_' character should be allowed as the first character. The regex for that would be:
RewriteRule ^([a-z0-9]+[\w-]+)\.fedorapeople\.org/(.*) /home/fedora/$1/public_html/$2 [L]
If we all agree the '-' or '_' character should not be allowed as the first character, I will submit a PR with that rule.
All of these rules were tested using Regex101 Online Tester.
Thoughts?
AustinPowered
I would say lets not allow _ or - as first char. :) Otherwise it sounds good.
Just added PR-902 Issue#10377 - Allow underscore in fedorapeople username
So, with that pr, now:
https://fedorapeople.org/~vanessa_kris/
works
However https://vanessa_kris.fedorapeople.org/ dies not, and likely never will. _ isn't valid in dns hostnames. ;(
So, @vanessa_kris you may want to make a new account without the _ in it and close your current account.
We are going to adjust the account system to disallow _ in usernames, sorry for the hassle here. ;(
Let us know if you need any help with it.
Metadata Update from @kevin:
Thanks for all your help @kevin @austinpowered @leo . We'll get @vanessa_kris a new username without the underscore and re-do their group accesses etc.
Sorry for the hassle. ;(