We present an experimental study of a two-dimensional liquid foam, composed of a confined monolayer of bubbles, forced to flow within a model porous medium that mimics an inhomogeneous open fracture. It consists of a Hele-Shaw cell with a single localized constriction-like defect that reduces locally its gap and thus its permeability. Taking advantage of the possibility to directly visualize and follow the bubbles, we compute the bubble velocity field by image correlation analysis, as well as the bubble deformation field, through eccentricity measurements obtained by fitting each bubble with an ellipse. The defect acting as a permeable obstacle can strongly disturb the foam flow; we investigate here the influence of its geometry (height, size, and shape) on the average steady-state flow of foams of various liquid content, and specifically the motion and deformation of their elementary components, the bubbles. In the frame of the flowing foam, we can observe a recirculation around the obstacle, characterized by a multipolar velocity field. Its complex structure displays a strong fore-aft asymmetry, with an extended region downstream the constriction, where the foam velocity can be much larger than the imposed driving one. This overshoot was already revealed for nonpermeable obstacles, but here we show that its extent and intensity are associated to the bubble deformation and depend strongly and nontrivially on both the geometry of the constriction as well as the liquid fraction of the foam.