Added more documentation to shareAction function. Fixed security hole