Monorepo for Tangled tangled.org

appview: remove validator #993

open opened by boltless.me targeting master from sl/sqkrqopzkvoo
  • RBAC should be enforced on service logic.
  • We should not check for referenced records existence from db due to the nature of atproto.
  • Comment depth validation is not necessary. We can accept them and just don't render replies with deeper depth.

Move markdown sanitizer to dedicated package to avoid import cycle

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mcsfwwhtdr22
+29 -29
Interdiff #0 #1
appview/ingester.go

This patch was likely rebased, as context lines do not match.

appview/issues/issues.go

This patch was likely rebased, as context lines do not match.

appview/labels/labels.go

This file has not been changed.

appview/models/issue.go

This file has not been changed.

appview/models/label.go

This file has not been changed.

appview/models/string.go

This file has not been changed.

appview/models/validator.go

This file has not been changed.

appview/pages/funcmap.go

This patch was likely rebased, as context lines do not match.

appview/pages/markup/markdown.go

This file has not been changed.

appview/pages/markup/sanitizer/sanitizer.go

This file has not been changed.

appview/pages/pages.go

This patch was likely rebased, as context lines do not match.

appview/pulls/pulls.go

This patch was likely rebased, as context lines do not match.

appview/repo/repo.go

This file has not been changed.

+29 -29
appview/repo/settings.go
··· 388 388 topicStr = r.FormValue("topics") 389 389 ) 390 390 391 - err = rp.validator.ValidateURI(website) 392 - if website != "" && err != nil { 393 - l.Error("invalid uri", "err", err) 394 - rp.pages.Notice(w, noticeId, err.Error()) 395 - return 396 - } 397 - 398 - topics, err := rp.validator.ValidateRepoTopicStr(topicStr) 399 - if err != nil { 400 - l.Error("invalid topics", "err", err) 401 - rp.pages.Notice(w, noticeId, err.Error()) 402 - 403 - 404 - 405 - topicStr = r.FormValue("topics") 406 - ) 407 - 408 391 if website != "" { 409 392 if err := validateURI(website); err != nil { 410 393 l.Error("invalid uri", "err", err) ··· 420 403 421 404 422 405 406 + topicStr = r.FormValue("topics") 407 + ) 423 408 409 + err = rp.validator.ValidateURI(website) 410 + if website != "" && err != nil { 411 + l.Error("invalid uri", "err", err) 412 + rp.pages.Notice(w, noticeId, err.Error()) 413 + return 414 + } 424 415 416 + topics, err := rp.validator.ValidateRepoTopicStr(topicStr) 417 + if err != nil { 418 + l.Error("invalid topics", "err", err) 419 + rp.pages.Notice(w, noticeId, err.Error()) 425 420 426 421 427 422 ··· 454 449 455 450 456 451 457 - rp.pages.HxRefresh(w) 458 - } 459 - 460 - 461 - 462 - 463 - 464 - 465 - 466 - 467 - 468 - 469 452 470 453 471 454 ··· 529 512 } 530 513 return nil 531 514 } 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + rp.pages.HxRefresh(w) 531 + }
appview/state/router.go

This patch was likely rebased, as context lines do not match.

appview/state/state.go

This file has not been changed.

appview/validator/issue.go

This file has not been changed.

appview/validator/label.go

This file has not been changed.

appview/validator/patch.go

This file has not been changed.

appview/validator/repo_topics.go

This file has not been changed.

appview/validator/string.go

This file has not been changed.

appview/validator/uri.go

This file has not been changed.

appview/validator/validator.go

This file has not been changed.

History

2 rounds 1 comment
sign up or login to add to the discussion
1 commit
expand
appview: remove validator
2/3 failed, 1/3 success
expand
merge conflicts detected
expand
  • appview/issues/issues.go:27
  • appview/labels/labels.go:15
  • appview/pages/markup/markdown.go:47
  • appview/pages/markup/sanitizer.go:10
  • appview/pages/pages.go:57
  • appview/pulls/pulls.go:27
  • appview/repo/repo.go:49
  • appview/repo/settings.go:4
  • appview/state/router.go:313
  • appview/state/state.go:23
  • appview/validator/label.go:1
expand 0 comments
1 commit
expand
appview: remove validator
1/3 timeout, 2/3 success
expand
expand 1 comment