Steps to reproduce:
1. Create Community "Com1"
2. in Com1, create two pages:
- Page1: uncheck "view" permission for guest
- Page2: check "hidden"
3. Open new browser and go to page2 (without logging in) using friendlyURL (localhost:8080/web/com1/page2), you get message "You do not have permission to view this page."
You will find that you adding a random other page, which is not hidden and has view permissions for guest, will allow you access page2 via friendlyURL