Learn more about these different git repos.
Other Git URLs
I can't use a private repository with OAuth token, for example https://123:x-oauth-basic@github.com/team/proj.git for build SCM on own hosted private Copr.
https://123:x-oauth-basic@github.com/team/proj.git
Is it bug or expected behavior?
Can we use custom validator instead of wtforms.validators.URL() ?
from wtforms import StringField, validators from flask_wtf import Form as FlaskForm from flask import Flask, request, redirect class PackageFormScm(FlaskForm): clone_url = StringField( "Clone url", validators=[ validators.DataRequired(), validators.URL()]) app = Flask(__name__) app.config['TESTING'] = True app.config['WTF_CSRF_ENABLED'] = False @app.route('/test', methods = ['POST']) def test(): form = PackageFormScm(request.form) print(form.validate()) return redirect('/') app = app.test_client() app.post('/test', data=dict(clone_url='https://github.com/team/proj.git')) app.post('/test', data=dict(clone_url='https://123:x-oauth-basic@github.com/team/proj.git')) # got: True False
PR https://github.com/wtforms/wtforms/pull/474 will resolve the issue
Great that you took a look at it. Thanks!
On Thursday, February 7, 2019 4:40:00 PM CET Anatolii Vorona wrote:
Be careful; the clone url (nor any other package configuration) isn't a secrete information in copr, so make sure that you don't mind that anybody will see your token.
On Thursday, February 7, 2019 4:40:00 PM CET Anatolii Vorona wrote: I can't use a private repository with OAuth token, for example https://123:x-oauth-basic@github.com/team/proj.git for build SCM on own hosted private Copr. Be careful; the clone url (nor any other package configuration) isn't a secrete information in copr, so make sure that you don't mind that anybody will see your token.
Thank you, i fully understand this ("own hosted private Copr").
As long as wtforms maintainers consider to be a bug, yes.
Why not (at least temporarily) but since our Copr instances aren't affected (it's not advisable to put github token into public database fields in copr), I doubt we'll have a time for this.
Would you mind writing a patch?
Metadata Update from @praiskup: - Issue tagged with: RFE
This issue has been migrated to GitHub: https://github.com/fedora-copr/copr/issues/525
Metadata Update from @nikromen: - Issue close_status updated to: MIGRATED - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.