? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
8 Oct 2016

Pull Request for Issue # #10653 (comment) and #12338

Moving the access to the xtd-editors buttons to the plugins themselves.
Allow authors to use xtd-articles and pagebreak.

Main reason: displaying the list of articles to an author or to an Editor does not change the kind of articles displayed in the lists, therefore it is useless to prevent authors from using these lists.
Concerning issues with modals in frontend, this now makes sure all xtd-editors modals are only used by logged in users (Image was already taken care of).

To test:
Make sure you have a menu item to Submit Article in frontend, log as a Author, then submit article and use the buttons Articles, Pagebreak, Module.

avatar infograf768 infograf768 - open - 8 Oct 2016
avatar infograf768 infograf768 - change - 8 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Oct 2016
Category Front End Components Plugins
avatar zero-24 zero-24 - change - 8 Oct 2016
Labels Added: ?
avatar dgt41
dgt41 - comment - 8 Oct 2016

@infograf768 I still believe that the javascript should be on the layout file and not in the plugin. But that's another issue...
I will test later on

avatar infograf768
infograf768 - comment - 8 Oct 2016

@dgt41
Concerning the js, we can, if desired, move it in later J! releases. For now, we just need to make sure someone is logged in and access to these xtd-editors is OK for authors.

avatar infograf768 infograf768 - change - 8 Oct 2016
The description was changed
avatar infograf768 infograf768 - edited - 8 Oct 2016
avatar dgt41
dgt41 - comment - 8 Oct 2016

@infograf768 I know, it just bothers me that although someone could (potentially) change the mark up on these views, they have to rewrite the plugins for some lines of js...
But this problem you are solving here, is way more important!

avatar AlexRed
AlexRed - comment - 9 Oct 2016

Now is ok, but is different from the admin panel procedure.
After set the Pagebreak by Author in frontend now show a iframe in the modal windows. Inside the iframe there is the website homepage.
Also for the module button.
Uploading iframe-page-break.png…


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12353.

avatar infograf768
infograf768 - comment - 9 Oct 2016

@AlexRed
Not here on 3.6.3-dev

screen shot 2016-10-09 at 10 39 54
screen shot 2016-10-09 at 10 39 06

screen shot 2016-10-09 at 10 42 00

avatar AlexRed
AlexRed - comment - 9 Oct 2016
avatar infograf768
infograf768 - comment - 9 Oct 2016

@AlexRed
Maybe you should use staging + patch. Here is my video
xtd

avatar AlexRed
AlexRed - comment - 9 Oct 2016

I use today Nightly + patch

avatar brianteeman
brianteeman - comment - 9 Oct 2016

I get exactly the same behaviour as @alexred with current staging

avatar brianteeman brianteeman - test_item - 9 Oct 2016 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 9 Oct 2016

I have tested this item 🔴 unsuccessfully on ffdfe68


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12353.

avatar dgt41
dgt41 - comment - 9 Oct 2016

@AlexRed can you try the following:

insert

$this->eName    = JFactory::getApplication()->input->get('e_name', '', 'cmd');

at line 11 on administrator/components/com_content/views/article/tmpl/pagebreak.php

and report if that fixes the problem?

avatar brianteeman
brianteeman - comment - 9 Oct 2016

@dgt41 no it doesnt fix it and the issue is in more than page break - it can also be seen with other exitor-xtd such as modules

avatar infograf768
infograf768 - comment - 9 Oct 2016

I confirm the issue on a clean installation WHEN using using TinyMCE.

Please folks, test using Codemirror instead of tinyMCE.
@AlexRed @brianteeman

@dgt41
Looks like we do need a similar patch as the one you did for 3.7:
#12324

avatar brianteeman
brianteeman - comment - 9 Oct 2016

What would be the point of that. It needs to work with all the editors

avatar infograf768
infograf768 - comment - 9 Oct 2016

The point is that we have an issue with TinyMCE, NOT with the xtd-editors buttons

avatar infograf768
infograf768 - comment - 9 Oct 2016

I do confirm: clean install, NO patch, SuperAdmin logged in frontend, using the pagebreak or modules button: we get the same issue you folks noted when using TinyMCE

avatar brianteeman
brianteeman - comment - 9 Oct 2016

Thanks for wasting our time. When you have fixed this PR please let us know. No point at all testing if it works with a different editor

avatar infograf768
infograf768 - comment - 9 Oct 2016

Please test what I said:
use staging and log in as admin, try to use the xtd-editors buttons WITHOUT this patch and logged as superadmin in frontend.
This PR is just showing another release blocker issue that was happening BEFORE it.
It has been solved in 3.7 with #12324

You should rather thank me for finding this out a few days before release...

avatar AlexRed
AlexRed - comment - 9 Oct 2016

yes, I can confirm same problem without this patch as superadmin in frontend.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12353.

avatar infograf768
infograf768 - comment - 9 Oct 2016

Folks, first patch with #12372 (Thanks @dgt41 )
then you can test again with TinyMCE.

avatar dgt41 dgt41 - test_item - 9 Oct 2016 - Tested successfully
avatar dgt41
dgt41 - comment - 9 Oct 2016

I have tested this item successfully on ffdfe68


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12353.

avatar AlexRed AlexRed - test_item - 9 Oct 2016 - Tested successfully
avatar AlexRed
AlexRed - comment - 9 Oct 2016

I have tested this item successfully on ffdfe68

ok with #12372


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12353.

avatar dgt41 dgt41 - change - 9 Oct 2016
Status Pending Ready to Commit
avatar dgt41
dgt41 - comment - 9 Oct 2016

RTC

This should be merged together with #12372

avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2016
Labels Added: ?
avatar rdeutz rdeutz - close - 11 Oct 2016
avatar rdeutz rdeutz - merge - 11 Oct 2016
avatar rdeutz rdeutz - close - 11 Oct 2016
avatar joomla-cms-bot joomla-cms-bot - close - 11 Oct 2016
avatar rdeutz rdeutz - change - 11 Oct 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-10-11 10:57:38
Closed_By rdeutz
avatar rdeutz rdeutz - change - 11 Oct 2016
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 11 Oct 2016

Remove the RTC tag

avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2016
Labels Removed: ?
avatar ggppdk
ggppdk - comment - 11 Oct 2016

The ACL check on the component for displaying e.g. pagebreak is not proper (and for the XTD buttons)

https://github.com/joomla/joomla-cms/pull/12353/files#diff-58d7af9fe491285c0bec790cf59c6cc3R38

You can have create / edit / edit.own on a category and not have it at the component level,

thus this check is broken for all sites that do not give to their usergroups, these permissions to the component, but instead give them to specific categories (or even specific articles), i had describe this here:

#10653 (comment)

  • if it is decided not to drop the ACL checks for the pagebreak, then one needs to pass and check a specific "current" record (article) asset
avatar infograf768
infograf768 - comment - 11 Oct 2016

@ggppdk
Indeed, this patch was not aimed at solving fully the ACLs. Just to let author access these xtds with existing ACL (adding create and editown.

As a RC-3 has now been released, I suggest you propose a PR to implement it fully.

avatar Hackwar
Hackwar - comment - 15 Oct 2016

Please revert this PR. This effectively removes any access checks against the articles view in the backend. Everybody can now access the articles view, even with a guest user. You added checks to prevent a link from being displayed, but not opening the actual resource.

Simply open ?option=com_content&view=articles&layout=modal&tmpl=component&{formtoken}=1 on your site and you get a list of all articles that have public viewlevel.

avatar Hackwar
Hackwar - comment - 15 Oct 2016

This not only gives you a complete list of the public articles (some of which maybe should not be found yet), it also gives you a complete list of your sites categories, viewlevels, authors and more. A nice truckload of information to further construct attacks against your site.

avatar infograf768
infograf768 - comment - 16 Oct 2016

@Hannes
using the link you provide above as a guest, registered or author, I just get un frontend:
The most recent request was denied because it contained an invalid security token. Please refresh the page and try again.

Now, an author can indeed use the xtd when creating an article, which was not possible before.

When using the same link when not logged in backend just displays the login page

avatar infograf768
infograf768 - comment - 16 Oct 2016

Now, as I said, we can re-add the checks in
ROOT/components/com_content/content.php, but using instead of only core.edit, also core.create and core.editown

avatar Hackwar
Hackwar - comment - 16 Oct 2016

Sorry, github swallowed parts of my link. You need to replace {formtoken} with the token. You can get that token from for example the login or contact-form view. This is a serious security issue!

avatar infograf768
infograf768 - comment - 16 Oct 2016

@Hackwar
I can re-add the checks in content.php but also including create an edit.own
Would that be OK for you? I mean: is it OK for you to let authors use these xtds (will be the same isssue for the 3.7 branch and its new xtds)

avatar infograf768
infograf768 - comment - 16 Oct 2016

Taking into account your comment here:
#12321 (comment)

I will now make a PR towards staging

avatar Hackwar
Hackwar - comment - 16 Oct 2016

Re-adding that check is a good first step. From my perspective, we need to further check this and consider what we display to editors, etc. Should someone with frontend editing capabilities see all categories, viewlevels and articles in the modal? I'd say that we have to restrict all of this to only those elements that the user would have access to.

avatar infograf768
infograf768 - comment - 16 Oct 2016

As we can't right now do all necessary checks, this #12435 will let authors access to the xtds while preventing guest or registered users.
It just changes the limitation from editor to author.

Add a Comment

Login with GitHub to post a comment