Port fix for file sec endpoint from develop

Port fix from dev