Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Is it time to switch 'el-get-allow-insecure to nil #2439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

manandbytes
Copy link
Contributor

@manandbytes manandbytes commented Sep 2, 2016

...and cut a new release? Please, do not merge yet as, in the first place, I'm looking for feedback if I'm doing something completely stupid ;-)
I'm going update some commit messages and documentation later.

Unresolved issues

(when (and (not el-get-allow-insecure)
(not (stringp (car (member protocol el-get-secure-protocols))))
(not file-local)
(not (string-match "^[-_\.A-Za-z0-9]+@" url)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember a signle case of such URL and going to remove support for URLs starting with 'USERNAME@'.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssh+git URLs can start with USERNAME@, see https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#The-SSH-Protocol. Apparently ssh://USERNAME@... also works, but github always offers [email protected]... for ssh URLs.

@npostavs
Copy link
Collaborator

npostavs commented Sep 2, 2016

...and cut a new release?

We're currently in a "rolling release" model, which simplifies the questions of how to upgrade from an older release to a new one :) So before cutting a release we'd have to think about how to answer those.

"Allow packages to be installed over insecure connections."
:group 'el-get
:type 'boolean)

(defcustom el-get-secure-protocols '("https" "ssh" "git+ssh" "bzr+ssh" "sftp")
"List of secure protocols"
:group 'el-get
:package-version '(el-get-custom . "6")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sure if el-get-custom is the right package as el-get-methods.el actually depends on el-get-secure-protocols. Or even (el-get . "6")?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package should be just el-get, I think. el-get-custom is not versioned independently.

@npostavs
Copy link
Collaborator

npostavs commented Sep 3, 2016

Hmm, perhaps we should tag some kind of release, since it seems that el-get is in melpa-stable right now (see #2438).

@manandbytes manandbytes force-pushed the insecure-check branch 3 times, most recently from 28bae7e to a001240 Compare September 4, 2016 08:54
(defun el-get-insecure-check (package url)
(let* ((checksum (plist-get (el-get-package-def package) :checksum))
(defun el-get-insecure-check (PACKAGE URL)
"Check if it's safe to install PACKAGE from url.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not sure about the docstring...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be from URL, and I think the docstring should mention that an error is thrown if it's insecure/not safe. Otherwise looks good to me.

@manandbytes
Copy link
Contributor Author

As it turned out this PR's main feature is defcustom for the list of secure URL protocols, I'm not sure what to do next. I'm going to create a separate PR for this, is it 🆗?

These commits are not ready anyway and should not block the rest:

  • [RFC] Time to switch 'el-get-allow-insecure to nil
  • Semantic URL parsing
  • [WIP] Don't consider URL starting with 'username@' as secure

@npostavs
Copy link
Collaborator

npostavs commented Sep 4, 2016

I'm going to create a separate PR for this, is it 🆗?

Sure thing.

@manandbytes
Copy link
Contributor Author

I'm going to create a separate PR for this, is it 🆗?

Sure thing.

Done, #2441.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants