Constraints on the inner density profile of dark matter haloes from weak gravitational lensing