Added data length validation to cube server