Skip to content

feat: allowOutsideReadDir configuration #8852

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

Closed
wants to merge 4 commits into from

Conversation

eromano
Copy link

@eromano eromano commented Dec 12, 2017

Load file from an external folder now fails because of this check :
An asset cannot be read from a location outside the project
Introduced by the PR:
64c6031#diff-9eb0a75e499bdadd44d6dc62218812b8
With allowOutsideOutDir property asset configuration the user can decide to allow this kind of behaviour:

"assets": [
  {
    "glob": "**/*",
    "input": "/temp-folder/outside-allowed/of/project",
    "output": "../not-dist/some/folder/",
    "allowOutsideReadDir": true
  },
]

it is false by default and be enabled by the user only when he knows the security risk behind this kind of decision.

See issue: #8783

@eromano
Copy link
Author

eromano commented Dec 12, 2017

Hi guys this PR is needed to our project https://github.com/Alfresco/alfresco-ng2-components in order to update the angular cli.
If you want I am happy to illustrate the problem that we need to solve

@tleveque23
Copy link

Any news on this one? Seems that only some reviews are missing. This bug is really annoying for our project....

@bjornharvold
Copy link

Interested in how this will get resolved as well. Wouldn't having a mono repo with common assets in an external directory be a good use case for this feature? In my case, I have Ethereum contracts in one project that needs to be compiled and then used by an admin app and a consumer app. All 3 projects are in the same mono repo at the same level.

@hansl hansl removed their assignment Feb 8, 2018
@hansl
Copy link
Contributor

hansl commented Feb 12, 2018

@eromano Could you add a warning on compilation when the configuration option is present (and error out if it's not)?

The reason this check is there is so that people cannot ng build && deploy and end up with files they don't want (or aren't aware of) from, e.g., their home directory. There's a way to copy all your SSH keys for example to the assets directory, and someone who doesn't know better will end up with their CD keys available publicly.

This will be all removed in the soon future (next major), but we can make that fix in 1.7.0.

@prashu2705
Copy link

Hi,

When will this be merged? I'm in need of this change as well.

Thanks.

@eromano
Copy link
Author

eromano commented Mar 9, 2018

@hansl I have added the warning. I don't know if this PR still make sense or not.
Sorry for the late response but I didn't notice the mention

@SpellChucker
Copy link

+1 on this one too, we use a shared folder for assets outside of the project and pull them in through .angular-cli.json.

@eromano
Copy link
Author

eromano commented Mar 22, 2018

@hansl should I rebase it another time? or there are no intention to merge it?

@Dumpen
Copy link

Dumpen commented Apr 3, 2018

This would be a greatly appreciated feature. We have a lot of shared assets that will benefit from this.

@kafumanto
Copy link

kafumanto commented Apr 5, 2018

We are using sibling shared modules and this missing feature is a problem.

Is there any known workaround in the mean time?

@agustintarifa
Copy link

Any news about this?

@alexeagle alexeagle added the needs: discussion On the agenda for team meeting to determine next steps label Aug 14, 2018
@alexeagle
Copy link
Contributor

Sorry this got stale @eromano
Sounds like this change is still needed? Will discuss with @hansl

@ngbot
Copy link

ngbot bot commented Aug 14, 2018

Hi @eromano! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@alexeagle
Copy link
Contributor

We are okay with accepting a PR to read assets from outside the project. But this needs some work to re-base first (likely just make the change again fresh).

@alexeagle alexeagle removed the needs: discussion On the agenda for team meeting to determine next steps label Aug 16, 2018
@alan-agius4
Copy link
Collaborator

Thanks for your PR. Though I'll be closing as per @alexeagle comment. Please re-open the PR when the issues are fixed and is in a mergeable state.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.