Skip to content

Conversation

@DeepDiver1975
Copy link
Member

…ants to access - fixes #43

bildschirmfoto von 2017-07-14 12-48-16

@codecov
Copy link

codecov bot commented Jul 14, 2017

Codecov Report

Merging #59 into master will decrease coverage by 2.92%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #59      +/-   ##
============================================
- Coverage     91.85%   88.92%   -2.93%     
- Complexity      166      171       +5     
============================================
  Files            20       20              
  Lines           577      596      +19     
============================================
  Hits            530      530              
- Misses           47       66      +19
Impacted Files Coverage Δ Complexity Δ
lib/AppInfo/Application.php 23.91% <0%> (-16.83%) 11 <5> (+5)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b5e87b...74c2964. Read the comment docs.

Copy link

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

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

The screenshot looks good, and it seems that's what we want.
But i'm not qualified to review PHP code.

var $loginMessage = $('#body-login').find('#message');
if ($loginMessage.length) {
var client = $("data[key='oauth2']").attr('value');
var msg = t('oauth2', 'The application "{app}" is requesting access to your account. To authorize it, please log in first.', {app : client});

Choose a reason for hiding this comment

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

Forgive my ignorance, as i don't really know the frameworks involved... But is 'client' getting html-escaped somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

afaik t() is doing this properly .... will have a second look ....

Copy link
Member Author

Choose a reason for hiding this comment

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

Just tested - it is escaped - thx for the hint

});
}

public function boot() {

Choose a reason for hiding this comment

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

So if I understand correctly, this function is called for the login screen (Is it the login screen only or all the screens?) and injects the javascript that will change the login message.

Copy link
Member Author

Choose a reason for hiding this comment

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

it will be called for any request-

Choose a reason for hiding this comment

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

Should you not check that it is only for the login screen?

Copy link
Member Author

Choose a reason for hiding this comment

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

the js code is doing this - not perfect but enough

}
$params = [];
parse_str($urlParts['query'], $params);
if (!isset($params['client_id'])) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are checking for redirect_uri and client_id but in the controller function there are some more checks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Besides that: looks good. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

basically 'just because' I don't need the other parameter at this point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok. I just thought that a request with missing parameters at the login stage will eventually fail at the authorize stage...

@DeepDiver1975 DeepDiver1975 merged commit 9400b66 into master Jul 17, 2017
@DeepDiver1975 DeepDiver1975 deleted the enhance-login branch July 17, 2017 07:30
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.

Basic login page variation when authenticating from an OAuth application

4 participants