-
Notifications
You must be signed in to change notification settings - Fork 132
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
MM-15455 Some improvments to cloud connect flow. #55
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,6 @@ const ( | |
argMMToken = "mm_token" | ||
) | ||
|
||
const requireUserApproval = true | ||
|
||
func httpACUserRedirect(jci *jiraCloudInstance, w http.ResponseWriter, r *http.Request) (int, error) { | ||
if r.Method != http.MethodGet { | ||
return http.StatusMethodNotAllowed, | ||
|
@@ -32,10 +30,7 @@ func httpACUserRedirect(jci *jiraCloudInstance, w http.ResponseWriter, r *http.R | |
return http.StatusBadRequest, err | ||
} | ||
|
||
submitURL := path.Join(jci.Plugin.GetPluginURLPath(), routeACUserConnected) | ||
if requireUserApproval { | ||
submitURL = path.Join(jci.Plugin.GetPluginURLPath(), routeACUserConfirm) | ||
} | ||
submitURL := path.Join(jci.Plugin.GetPluginURLPath(), routeACUserConfirm) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The confirmation is required to be secure. Otherwise you can trick people into clicking the link. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jasonblais is requesting the opposite :) Can you two please resolve it? (I'm 3/5 that security should win, and we should have the explicit warning/confirmation) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup. Will chat with @jasonblais There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Chatted with @crspeller, given the level of a security vulnerability if this button wasn't added, I'm good with this change. Approving PR. |
||
|
||
return jci.Plugin.respondWithTemplate(w, r, "text/html", struct { | ||
SubmitURL string | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will return an error if not valid, but just for sanity. (they check this in their docs)