Both, but dexterity is the one people under-invest in — and it has a rule of thumb attached.
Strength raises your damage and accuracy, so it is never wasted. Dexterity, though, gates what you can hit at all: too little and high-level monsters dodge you regardless of how hard you swing. The common recommendation is to keep dexterity about five points above your character level, so a level 10 pirate runs 15 DEX, and then pour everything else into strength.
Allocate your points to match your class rather than borrowing a build from another one, and check the current stat and skill tables, since rebalancing over the years has shifted these numbers around.